cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Add-Ons (2004)

Former Member
0 Kudos

Hello,

I want Uninstaller for my add-on, I have a installer and is OK. The installer must contain the Uninstaller, this is my question. I don`t know.

If somebody has an example in visual basic 6.0.....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Santiago,

When you create the add on registration data file, one of the parameters you can enter is "Uninstaller command line arguments". In here you can (for example) add a /u parameter. This means that when the user selects to remove add-on, your addon installer will be called with the /u parameter. You can catch this in your installer if you look at the command line parameters. Then the procedure you will invoke should look something like this (it's the only VB6 example I could find). You should also delete all the files in your directory manually.

'BOOL UnRegisterAddOn(const TCHAR *installDataFile);
Private Declare Function UnRegisterAddOn Lib "SBOAddonReg.dll" (ByVal installDataFile As String) As Boolean

Private Sub CmdUnReg()
    Dim InstallStrFile  As String
    
    InstallStrFile = App.Path & "SBOAddOnRegData.sld"

    If UnRegisterAddOn(InstallStrFile) = 1 Then
        MsgBox "AddOn Was UnRegistered Successfully"
    Else
        MsgBox "Failed To UnRegister AddOn"
    End If
End Sub

Hope it helps,

Adele

Answers (0)