Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Uninstall trial verson Excel 2007 | Excel Discussion (Misc queries) | |||
uninstall excel 2007 | Excel Discussion (Misc queries) | |||
Uninstall Addin | Excel Programming | |||
Excel: How to uninstall a COM add-in built with VB .NET | Excel Programming | |||
Remove Excel AddIn from AddIn List !! Help | Excel Programming |