Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Uninstall Excel Addin

Hello all;

I have a question about the proper way to uninstall my Excel Addin (.xla
file), developed with VSTO 2003.

My installer will remove the proper files and directorys, and I have a
custom command-line app which adjusts the .NET Configuration Security Policy
correctly (using caspol.exe).

What I want to know is how to keep Excel from trying to load the addin after
it has been uninstalled? Do I have to adjust the registry entry
"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Excel\Options\OPEN", or is
there an easier/better way?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Uninstall Excel Addin

Have you tried Tools - Addins.. - uncheck the box ??
--
Gary's Student


"Derrick" wrote:

Hello all;

I have a question about the proper way to uninstall my Excel Addin (.xla
file), developed with VSTO 2003.

My installer will remove the proper files and directorys, and I have a
custom command-line app which adjusts the .NET Configuration Security Policy
correctly (using caspol.exe).

What I want to know is how to keep Excel from trying to load the addin after
it has been uninstalled? Do I have to adjust the registry entry
"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Excel\Options\OPEN", or is
there an easier/better way?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Uninstall Excel Addin

Sorry - should've been more clear. I need to do this programmatically,
during the uninstall process of my addin.

Also, I just noticed that the registry key method is not going to work
reliably.

Thanks,

Derrick

"Gary's Student" wrote in message
...
Have you tried Tools - Addins.. - uncheck the box ??
--
Gary's Student


"Derrick" wrote:

Hello all;

I have a question about the proper way to uninstall my Excel Addin (.xla
file), developed with VSTO 2003.

My installer will remove the proper files and directorys, and I have a
custom command-line app which adjusts the .NET Configuration Security
Policy
correctly (using caspol.exe).

What I want to know is how to keep Excel from trying to load the addin
after
it has been uninstalled? Do I have to adjust the registry entry
"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Excel\Options\OPEN", or
is
there an easier/better way?





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Uninstall Excel Addin

Hi Derrick,

It is not easy. The only way that I found to make that is to carry out this
operation by a sending senkeys sequence in Excel. You can create an Excel
file and include the following procedu

Sub UninstallAddIn()
Const xlaPath = "C:\"
Const xlaFileName = "YourAddin.xla"
Dim I As Integer, Ok As Boolean
DoEvents
With AddIns
For I = 1 To .Count
If .Item(I).Name = xlaFileName Then
..Item(I).Installed = False
Ok = True: Exit For
End If
Next I
If Not Ok Then Exit Sub
On Error Resume Next
Kill xlaPath & xlaFileName
SendKeys "{HOME}"
For I = 1 To .Count
If .Item(I).Name = xlaFileName Then Exit For
SendKeys "{DOWN}"
Next I
SendKeys "~{ESC}"
Application.CommandBars.FindControl(ID:=943).Execu te
End With
End Sub

And after, you can run this procedure with a vbs file:

Const xlFileName = "Full path of your Excel file created"
Dim objXl, Fso
Set objXL = WScript.CreateObject("Excel.Application")
objXL.Visible = TRUE ' Or False
objXL.WorkBooks.Open xlFileName
objXL.Run "UninstallAddIn"
objXL.Quit
Set objXL = Nothing
Set Fso = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
Fso.DeleteFile xlFileName
Set Fso = Nothing
WScript.Quit

It must be possible to include the totality of the code in your desinstaller
if the language used includes the control flow instruction (DoEvents), which
is not the case of vbscript.

MP

"Derrick" a écrit dans le message de news:
...
Hello all;

I have a question about the proper way to uninstall my Excel Addin (.xla
file), developed with VSTO 2003.

My installer will remove the proper files and directorys, and I have a
custom command-line app which adjusts the .NET Configuration Security

Policy
correctly (using caspol.exe).

What I want to know is how to keep Excel from trying to load the addin

after
it has been uninstalled? Do I have to adjust the registry entry
"HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\ Excel\Options\OPEN", or

is
there an easier/better way?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uninstall trial verson Excel 2007 Kelbanker Excel Discussion (Misc queries) 5 June 5th 08 10:48 AM
uninstall excel 2007 The Whale Excel Discussion (Misc queries) 1 January 25th 07 07:15 PM
Uninstall Addin Jos Vens[_2_] Excel Programming 2 April 11th 05 12:17 PM
Excel: How to uninstall a COM add-in built with VB .NET Howard Kaikow Excel Programming 2 May 11th 04 10:31 PM
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"