Add your uninstaller to add/remove programs.
Posted: Thu Sep 22, 2005 12:15 pm
Code updated For 5.20+
I've just added this to SpyMon and ReportBuilder, thought I may as well share it...
Its fairly easy to use, here is an example:
You need to include full paths in your uninstall apps as the working directory usually isn't the same place as the actual uninstall program.
I just point to the original application that was installed for an icon, it seems to work okay.
Your uninstall program should delete the registry key as it finishes (to take it out of add/remove programs).
I've just added this to SpyMon and ReportBuilder, thought I may as well share it...

Code: Select all
Procedure SetUninstall(name$,pub$,url$,email$,telno$,dicon$,uexe$)
ukey=0
If RegCreateKey_(#HKEY_LOCAL_MACHINE,"Software\Microsoft\Windows\CurrentVersion\Uninstall\"+name$,@ukey)=0
RegSetValueEx_(uKey,"DisplayName",0,#REG_SZ,@name$,Len(name$)+1)
RegSetValueEx_(uKey,"DisplayIcon",0,#REG_SZ,@dicon$,Len(dicon$)+1)
RegSetValueEx_(uKey,"Publisher",0,#REG_SZ,@pub$,Len(pub$)+1)
RegSetValueEx_(uKey,"URLInfoAbout",0,#REG_SZ,@url$,Len(url$)+1)
RegSetValueEx_(uKey,"HelpLink",0,#REG_SZ,@url$,Len(url$)+1)
RegSetValueEx_(uKey,"Contact",0,#REG_SZ,@email$,Len(email$)+1)
RegSetValueEx_(uKey,"HelpTelephone",0,#REG_SZ,@telno$,Len(telno$)+1)
RegSetValueEx_(uKey,"UninstallString",0,#REG_SZ,@uexe$,Len(uexe$)+1)
RegCloseKey_(uKey)
EndIf
EndProcedure
Code: Select all
SetUninstall("ReportBuilder","Apple Panic Limited","http://www.ApplePanic.com","office@ApplePanic.com","+44(0)870 xx xxxx",AppFilename$,SetupDir$+"\UnInstall.exe")
I just point to the original application that was installed for an icon, it seems to work okay.
Your uninstall program should delete the registry key as it finishes (to take it out of add/remove programs).