Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 2
Default Help with Uninstall Event

Hi

Some thing bizarre is happening! I have an add-in which when uninstalled
through the uninstall event removes a custom toolbar attached to it. Im
using Inno Setup to uninstall this add-in through Automation.

This works perfectly on my windows 2000 machine, but on my windows xp
machine the add-in is removed from the add-in list, but the toolbar isn't.

Both machines are running Excel 2000.

Hopefully a genius out there can help out this non-genius!

Cheers

Clinton


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 11,272
Default Help with Uninstall Event

Showing the code might help.

What is Inno Setup?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Clinton" wrote in message
...
Hi

Some thing bizarre is happening! I have an add-in which when uninstalled
through the uninstall event removes a custom toolbar attached to it. Im
using Inno Setup to uninstall this add-in through Automation.

This works perfectly on my windows 2000 machine, but on my windows xp
machine the add-in is removed from the add-in list, but the toolbar isn't.

Both machines are running Excel 2000.

Hopefully a genius out there can help out this non-genius!

Cheers

Clinton




  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 2
Default Help with Uninstall Event

Well, inno setup is actually irrelevant. Here is the VB code that does the
uninstallation. I just put the name of the add-in as listed in Tools|Addins
as the command line parameter(s)

Dim oXL As Object, oAddin As Object
Dim i As Integer

Set oXL = CreateObject("Excel.Application")
Call GetCommandLine

For i = 1 To UBound(argarray)

'if inverted commas are included in commandline, would cause error
'as add-in file name would not exist. this function removes the inverted
commas

If Len(argarray(i)) = 0 Then
MsgBox "No Command Line arguments - cannot automatically remove
Excel Add-in(s).", vbCritical, "No Command Line Arguments"
End
End If

argarray(i) = ReplaceLetter(argarray(i), Chr(34), "")

'unticks add-in in Tools|Add-ins and runs the uninstall event!
'note the trim. this is to cater for parameters separated by a comma,
and also a comma and space
oXL.addins(Trim(argarray(i))).Installed = False

'once uninstalled, can delete Add-in. However, this doesn't remove the
deleted add-in from
'Tools | Add-ins.
Kill oXL.addins(Trim(argarray(i))).fullname

Next i

oXL.Quit
Set oXL = Nothing

On Error GoTo 0

End Sub
"Bob Phillips" wrote in message
...
Showing the code might help.

What is Inno Setup?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Clinton" wrote in message
...
Hi

Some thing bizarre is happening! I have an add-in which when uninstalled
through the uninstall event removes a custom toolbar attached to it. Im
using Inno Setup to uninstall this add-in through Automation.

This works perfectly on my windows 2000 machine, but on my windows xp
machine the add-in is removed from the add-in list, but the toolbar

isn't.

Both machines are running Excel 2000.

Hopefully a genius out there can help out this non-genius!

Cheers

Clinton






  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba
external usenet poster
 
Posts: 11,272
Default Help with Uninstall Event

Thought so, but just interested.

Can't run it as you don't give us the GetCommandLine sub.

Are you not explicitly deleting the toolbar?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Clinton" wrote in message
...
Well, inno setup is actually irrelevant. Here is the VB code that does the
uninstallation. I just put the name of the add-in as listed in

Tools|Addins
as the command line parameter(s)

Dim oXL As Object, oAddin As Object
Dim i As Integer

Set oXL = CreateObject("Excel.Application")
Call GetCommandLine

For i = 1 To UBound(argarray)

'if inverted commas are included in commandline, would cause error
'as add-in file name would not exist. this function removes the

inverted
commas

If Len(argarray(i)) = 0 Then
MsgBox "No Command Line arguments - cannot automatically remove
Excel Add-in(s).", vbCritical, "No Command Line Arguments"
End
End If

argarray(i) = ReplaceLetter(argarray(i), Chr(34), "")

'unticks add-in in Tools|Add-ins and runs the uninstall event!
'note the trim. this is to cater for parameters separated by a comma,
and also a comma and space
oXL.addins(Trim(argarray(i))).Installed = False

'once uninstalled, can delete Add-in. However, this doesn't remove the
deleted add-in from
'Tools | Add-ins.
Kill oXL.addins(Trim(argarray(i))).fullname

Next i

oXL.Quit
Set oXL = Nothing

On Error GoTo 0

End Sub
"Bob Phillips" wrote in message
...
Showing the code might help.

What is Inno Setup?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Clinton" wrote in message
...
Hi

Some thing bizarre is happening! I have an add-in which when

uninstalled
through the uninstall event removes a custom toolbar attached to it.

Im
using Inno Setup to uninstall this add-in through Automation.

This works perfectly on my windows 2000 machine, but on my windows xp
machine the add-in is removed from the add-in list, but the toolbar

isn't.

Both machines are running Excel 2000.

Hopefully a genius out there can help out this non-genius!

Cheers

Clinton








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 Office Products MD4589 Excel Discussion (Misc queries) 1 December 21st 09 03:40 PM
How to uninstall office 2007 if I am not satisfied? Sivakumar.K Excel Discussion (Misc queries) 2 February 26th 09 01:34 PM
Uninstall Office 2000 Eric Excel Discussion (Misc queries) 1 September 7th 07 02:06 AM
uninstall excel 2007 The Whale Excel Discussion (Misc queries) 1 January 25th 07 07:15 PM
How to uninstall XP PIAs Carol CXie Excel Programming 0 October 24th 03 11:28 PM


All times are GMT +1. The time now is 11:22 PM.

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"