Jump to content

Uninstall Question


Audigy

Recommended Posts

Here is the question, I have created a couple of addons but have changed the default program group shortcuts on the start menu to a custom folder ie

C:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program Name

So how do I remove the shortcuts when the program is uninstalled. :blink: I could change the default install directory, but is there another way, now that I have created the addons?

Thanx inadvance ;)

Link to comment
Share on other sites

Here is the question, I have created a couple of addons but have changed the default program group shortcuts on the start menu to a custom folder ie

C:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program Name

So how do I remove the shortcuts when the program is uninstalled. :blink: I could change the default install directory, but is there another way, now that I have created the addons?

Thanx inadvance ;)

I wrote the code like below in the codebox,it is from my UltraISO Addon and I add the main program shortcut into %AllUsersProfiles%\Start menu\MyAPP\UltraISO,It work fine to me,


[Version]
Signature="$Windows NT$"

[Optional Components]
UltraISO

[DefaultInstall]
CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.Files,@UltraISO.inf
AddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddReg
RegisterDLLs=UltraISOShell.Dlls
ProfileItems =UltraISO.AddShortcut

[UltraISO]
OptionDesc ="UltraISO Premium Edition"
Tip ="UltraISO Premium Edition Addon"
Modes =0,1,2,3
CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.Files
AddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddReg
RegisterDLLs=UltraISOShell.Dlls
ProfileItems =UltraISO.AddShortcut

[SourceDisksNames.x86]
1="UltraISO Files","UltraISO.cab",,"i386"

[DestinationDirs]
UltraISO.Files =16422,UltraISO
lang.Files =16422,UltraISO\lang
drivers.files =16422,UltraISO\drivers
Common.Files =16422,Common Files\EZB Systems

[SourceDisksFiles]
History.txt =1
isoshell.dll =1
License.txt =1
Readme.txt =1
ultraiso.chm =1
UltraISO.exe =1
ultraiso.ico =1
unins000.dat =1
unins000.exe =1
lame_enc.dll =1
ISODrv64.sys =1
IsoCmd.exe =1
ISODrive.sys =1
lang_cn.dll =1
lang_jp.dll=1

[UltraISO.Files]
Readme.txt
ultraiso.chm
UltraISO.exe
ultraiso.ico
unins000.dat
unins000.exe
History.txt
isoshell.dll
License.txt

[lang.Files]
lang_cn.dll
lang_jp.dll

[Common.Files]
lame_enc.dll

[Drivers.Files]
ISODrv64.sys
IsoCmd.exe
ISODrive.sys

[UltraISO.AddShortcut]
Name =UltraISO
CmdLine =16422,UltraISO,UltraISO.exe
SubDir =MyAPP\UltraISO
WorkingDir =16422,UltraISO

[UltraISOShell.Dlls]
16422,UltraISO,isoshell.dll,1

[UltraISOInstall.AddReg]
HKCR,".bin",,0x0,"binimage"
HKCR,".iso",,0x0,"UltraISO"
HKCR,".isz",,0x0,"UltraISO"
HKCR,".ui",,0x0,"UltraISO"
HKCR,"binimage",,0x0,"BIN File"
HKCR,"binimage\DefaultIcon",,0x0,"""%16422%\UltraISO\UltraISO.exe"",0"
HKCR,"binimage\shell\Convert to ISO\command",,0x0,"""%16422%\UltraISO\UltraISO.exe"" -bin2iso ""%%1"""
HKCR,"binimage\shell\open\command",,0x0,"""%16422%\UltraISO\UltraISO.exe"" ""%%1"""
HKCR,"UltraISO",,0x0,"UltraISO File"
HKCR,"UltraISO\DefaultIcon",,0x0,"""%16422%\UltraISO\UltraISO.exe"",0"
HKCR,"UltraISO\shell\open",,0x0,"Open with &UltraISO"
HKCR,"UltraISO\shell\open\command",,0x0,"""%16422%\UltraISO\UltraISO.exe"" ""%%1"""

[USERSettings.AddReg]
HKCU,"%SEU5%",,0x0,"%16422%\UltraISO"
HKCU,"%SEU5%","Shared",0x0,"%16422%\Common Files\EZB Systems"
HKCU,"%SEU5%","XPBurn",0x0,"0"
HKCU,"%SEU5%","ISOFolder",0x0,"%16389%\My ISO Files"
HKCU,"%SEU5%","UseSkins",0x0,"3"
HKCU,"%SEU5%","SoundEffect",0x0,"1"
HKCU,"%SEU5%","Language",0x0,"1033"
HKCU,"%SEU5%","RecompileISO",0x0,"0"
HKCU,"%SEU5%","SaveBackup",0x0,"0"
HKCU,"%SEU5%","SuperRestore",0x0,"1"
HKCU,"%SEU5%","UserName",0x0,"%NAME%"
HKCU,"%SEU5%","Registration",0x0,"%SN%"
HKLM,"%SEU5%",,0x0,"%16422%\UltraISO"
HKLM,"%SEU5%","Shared",0x0,"%16422%\Common Files\EZB Systems"
HKLM,"%SEU5%","Install",0x0,"1"

[UltraISOUninstall.AddReg]
HKLM,"%UNINST%","Inno Setup: Setup Version",0x0,"5.2.3"
HKLM,"%UNINST%","Inno Setup: App Path",0x0,"%16422%\UltraISO"
HKLM,"%UNINST%","InstallLocation",0x0,"%16422%\UltraISO\"
HKLM,"%UNINST%","Inno Setup: Icon Group",0x0,"UltraISO"
HKLM,"%UNINST%","Inno Setup: User",0x0,"Administrator"
HKLM,"%UNINST%","Inno Setup: Selected Tasks",0x0,"desktopicon,associate,isodrive"
HKLM,"%UNINST%","Inno Setup: Deselected Tasks",0x0
HKLM,"%UNINST%","DisplayName",0x0,"UltraISO Premium %VER%"
HKLM,"%UNINST%","DisplayIcon",0x0,"%16422%\UltraISO\UltraISO.exe"
;
;----------------- I Add UNINSTALL String Here----------
HKLM,"%UNINST%","UninstallString",0,"rundll32.exe advpack.dll,LaunchINFSection UltraISO.inf,Uninstall"
HKLM,"%UNINST%","QuietUninstallString",0x0,"""%16422%\UltraISO\unins000.exe"" /SILENT"
HKLM,"%UNINST%","NoModify",0x10001,01,00,00,00
HKLM,"%UNINST%","NoRepair",0x10001,01,00,00,00

[Uninstall]
RunPreSetupCommands =RunUninst
ProfileItems=UltraISO.DelShortcut

[RunUninst]
%16422%\UltraISO\unins000.exe;<--It would be better if unins000.exe running in silent, anyone tell me how to making it working silently I'll appreciate it

[UltraISO.DelShortcut]
Name =UltraISO,0x00000002
SubDir=MyAPP\ULTRAISO

[Strings]
UNINST="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UltraISO_is1"
SEU5="Software\EasyBoot Systems\UltraISO\5.0"
VER="V9.30"
NAME="LiuHongWei"
SN=""

Edited by bjfrog
Link to comment
Share on other sites

Here is the question, I have created a couple of addons but have changed the default program group shortcuts on the start menu to a custom folder ie

C:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program Name

So how do I remove the shortcuts when the program is uninstalled. :blink: I could change the default install directory, but is there another way, now that I have created the addons?

Thanx inadvance ;)

Please post your ProfileItems so we can see them

Link to comment
Share on other sites

Please post your ProfileItems so we can see them

I am not using the ProfileItems I am just copying them to the start menu.

This is what I am using for VirDir Manager and softleds

[DestinationDirs]

Shortcut =16407,Utilts,Virmgr

[DestinationDirs]

Shortcut =16407,Utilts,Softleds

I just need some way to deleted these shortcuts when the programs get uninstalled.

Link to comment
Share on other sites

You can use DelFiles then to delete your shortcuts, this will use the same section used for CopyFiles to locate and delete the files

[Uninstall]
RunPreSetupCommands =RunUninst
DelFiles = Shortcut

OH and BTW some changes you wanted your INF

[Version]
Signature="$Windows NT$"

[Optional Components]
UltraISO

[DefaultInstall]
CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.Files,@UltraISO.inf
AddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddReg
RegisterDLLs=UltraISOShell.Dlls
ProfileItems =UltraISO.AddShortcut

[UltraISO]
OptionDesc ="UltraISO Premium Edition"
Tip ="UltraISO Premium Edition Addon"
Modes =0,1,2,3
CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.Files
AddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddReg
RegisterDLLs=UltraISOShell.Dlls
ProfileItems =UltraISO.AddShortcut

[SourceDisksNames.x86]
1="UltraISO Files","UltraISO.cab",,"i386"

[DestinationDirs]
UltraISO.Files =16422,UltraISO
lang.Files =16422,UltraISO\lang
drivers.files =16422,UltraISO\drivers
Common.Files =16427\EZB Systems ;<-Fixed common files flag

[SourceDisksFiles]
History.txt =1
isoshell.dll =1
License.txt =1
Readme.txt =1
ultraiso.chm =1
UltraISO.exe =1
ultraiso.ico =1
unins000.dat =1
unins000.exe =1
lame_enc.dll =1
ISODrv64.sys =1
IsoCmd.exe =1
ISODrive.sys =1
lang_cn.dll =1
lang_jp.dll=1

[UltraISO.Files]
Readme.txt
ultraiso.chm
UltraISO.exe
ultraiso.ico
unins000.dat
unins000.exe
History.txt
isoshell.dll
License.txt

[lang.Files]
lang_cn.dll
lang_jp.dll

[Common.Files]
lame_enc.dll

[Drivers.Files]
ISODrv64.sys
IsoCmd.exe
ISODrive.sys

[UltraISO.AddShortcut]
Name =UltraISO
CmdLine =16422,UltraISO,UltraISO.exe
SubDir =MyAPP\UltraISO
WorkingDir =16422,UltraISO

[UltraISOShell.Dlls]
16422,UltraISO,isoshell.dll,1

[UltraISOInstall.AddReg]
HKCR,".bin",,,"binimage"
HKCR,".iso",,,"UltraISO"
HKCR,".isz",,,"UltraISO"
HKCR,".ui",,,"UltraISO"
HKCR,"binimage",,,"BIN File"
HKCR,"binimage\DefaultIcon",,,"""%16422%\UltraISO\UltraISO.exe"",0"
HKCR,"binimage\shell\Convert to ISO\command",,,"""%16422%\UltraISO\UltraISO.exe"" -bin2iso ""%%1"""
HKCR,"binimage\shell\open\command",,,"""%16422%\UltraISO\UltraISO.exe"" ""%%1"""
HKCR,"UltraISO",,,"UltraISO File"
HKCR,"UltraISO\DefaultIcon",,,"""%16422%\UltraISO\UltraISO.exe"",0"
HKCR,"UltraISO\shell\open",,,"Open with &UltraISO"
HKCR,"UltraISO\shell\open\command",,,"""%16422%\UltraISO\UltraISO.exe"" ""%%1"""

[USERSettings.AddReg]
HKCU,"%SEU5%",,,"%16422%\UltraISO"
HKCU,"%SEU5%","Shared",,"%16427%\EZB Systems";<-Fixed 16427=%CommonProgramFiles%
HKCU,"%SEU5%","XPBurn",,"0"
HKCU,"%SEU5%","ISOFolder",,"%16389%\My ISO Files"
HKCU,"%SEU5%","UseSkins",,"3"
HKCU,"%SEU5%","SoundEffect",,"1"
HKCU,"%SEU5%","Language",,"1033"
HKCU,"%SEU5%","RecompileISO",,"0"
HKCU,"%SEU5%","SaveBackup",,"0"
HKCU,"%SEU5%","SuperRestore",,"1"
HKCU,"%SEU5%","UserName",,"%NAME%"
HKCU,"%SEU5%","Registration",,"%SN%"
HKLM,"%SEU5%",,,"%16422%\UltraISO"
HKLM,"%SEU5%","Shared",,"%16427%\EZB Systems" ;<-Fixed also
HKLM,"%SEU5%","Install",,"1"

[UltraISOUninstall.AddReg]
HKLM,"%UNINST%","Inno Setup: Setup Version",,"5.2.3"
HKLM,"%UNINST%","Inno Setup: App Path",,"%16422%\UltraISO"
HKLM,"%UNINST%","InstallLocation",,"%16422%\UltraISO\"
HKLM,"%UNINST%","Inno Setup: Icon Group",,"UltraISO"
HKLM,"%UNINST%","Inno Setup: User",,"Administrator"
HKLM,"%UNINST%","Inno Setup: Selected Tasks",,"desktopicon,associate,isodrive"
HKLM,"%UNINST%","Inno Setup: Deselected Tasks",0x0
HKLM,"%UNINST%","DisplayName",,"UltraISO Premium %VER%"
HKLM,"%UNINST%","DisplayIcon",,"%16422%\UltraISO\UltraISO.exe"
;
;----------------- I Add UNINSTALL String Here----------
HKLM,"%UNINST%","UninstallString",0,"rundll32.exe advpack.dll,LaunchINFSection UltraISO.inf,Uninstall"
;HKLM,"%UNINST%","QuietUninstallString",,"""%16422%\UltraISO\unins000.exe"" /SILENT" ;<-Not needed
HKLM,"%UNINST%","NoModify",0x10001,1
HKLM,"%UNINST%","NoRepair",0x10001,1

; You should add a uninstall prompt to this section now that the uninstaller is silent
[Uninstall]
RunPreSetupCommands =RunUninst
ProfileItems=UltraISO.DelShortcut

[RunUninst]
"""%16422%\UltraISO\unins000.exe"" /SILENT";<-made silent

[UltraISO.DelShortcut]
Name =UltraISO,0x00000002
SubDir=MyAPP\ULTRAISO

[Strings]
UNINST="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UltraISO_is1"
SEU5="Software\EasyBoot Systems\UltraISO\5.0"
VER="V9.30"
NAME="LiuHongWei"
SN=""

Link to comment
Share on other sites

Thanx for your reply ricktendo64, but I am a bit unsure... :blink:

this is my inf below, Not the one for UltraISO, bjfrog was just showing me how he did it in his addon.

Can I still use the DelFiles even if I am using the programs uninstall & where would I put it?

Thanx...

[Version]
Signature="$Windows NT$"

[Optional Components]
VirDir

[DefaultInstall]
AddReg =VirDir.AddReg
Copyfiles =VirDir.Files,Help.Files,VirDir.Shortcut

[VirDir]
OptionDesc ="VirDir"
Tip ="Create Virtual Drive"
Modes =0,1,2,3
AddReg =VirDir.AddReg
Copyfiles =VirDir.Files,Help.Files,VirDir.Shortcut

[DestinationDirs]
VirDir.Files =16422,%Vir%
Help.Files =16422,%VirHelp%
VirDir.Shortcut =16407,Utilts,Virmgr

[SourceDisksNames.x86]
1="Windows XP CD-Rom","VirDir.CAB",,"i386"

[SourceDisksFiles]
banner.jpg=1
dw.css=1
irunin.bmp=1
irunin.dat=1
irunin.ini=1
irunin.lng=1
shim.gif=1
virdir.exe=1
help.htm=1
VirDir.lnk=1

[VirDir.Files]
irunin.bmp
irunin.dat
irunin.ini
irunin.lng
virdir.exe
virdir_help.htm,help.htm

[Help.Files]
banner.jpg
dw.css
shim.gif

[VirDir.Shortcut]
VirDir.lnk

[VirDir.AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","VirDir",0x0,"%16422%\VirDir Manager\virdir.exe /startup"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9",,0x10
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9","DisplayName",0x0,"VirDir Manager"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9","UninstallString",0x0,"%10%\iun6002.exe ""%16422%\VirDir Manager\irunin.ini"""

[Strings]
Vir =VirDir Manager
VirHelp=VirDir Manager\virdir_help_files

Link to comment
Share on other sites

This should do it

[Version]
Signature="$Windows NT$"

[Optional Components]
VirDir

[DefaultInstall]
AddReg =VirDir.AddReg
Copyfiles =VirDir.Files,Help.Files,VirDir.Shortcut

[VirDir]
OptionDesc ="VirDir"
Tip ="Create Virtual Drive"
Modes =0,1,2,3
AddReg =VirDir.AddReg
Copyfiles =VirDir.Files,Help.Files,VirDir.Shortcut

[DestinationDirs]
VirDir.Files =16422,%Vir%
Help.Files =16422,%VirHelp%
VirDir.Shortcut =16407,Utilts,Virmgr

[SourceDisksNames.x86]
1="Windows XP CD-Rom","VirDir.CAB",,"i386"

[SourceDisksFiles]
banner.jpg=1
dw.css=1
irunin.bmp=1
irunin.dat=1
irunin.ini=1
irunin.lng=1
shim.gif=1
virdir.exe=1
help.htm=1
VirDir.lnk=1

[VirDir.Files]
irunin.bmp
irunin.dat
irunin.ini
irunin.lng
virdir.exe
virdir_help.htm,help.htm

[Help.Files]
banner.jpg
dw.css
shim.gif

[VirDir.Shortcut]
VirDir.lnk

[VirDir.AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","VirDir",0x0,"%16422%\VirDir Manager\virdir.exe /startup"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9",,0x10
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9","DisplayName",0x0,"VirDir Manager"
;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9","UninstallString",0x0,"%10%\iun6002.exe ""%16422%\VirDir Manager\irunin.ini"""
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\VirDir Manager0.9","UninstallString",0x0,"rundll32 advpack.dll,LaunchINFSection VirDir.inf,Uninstall"

[Uninstall]
RunPreSetupCommands =Run.Uninstaller
DelFiles =VirDir.Shortcut
RunPostSetupCommands=Del.ShortcutDirs

[Run.Uninstaller]
"%10%\iun6002.exe ""%16422%\VirDir Manager\irunin.ini"""

[Del.ShortcutDirs]
"rundll32 advpack.dll,DelNodeRunDLL32 ""%16407%\Utilts\Virmgr"",1"

[Strings]
Vir =VirDir Manager
VirHelp=VirDir Manager\virdir_help_files

Link to comment
Share on other sites

Rick,Thank you very much!

if the uninstall executable path like this

%16422%\%Prog_Dir%\%Sub_Dir%\uninst.exe

Does I write that line like this ?

[RunUninst]
""""%16422%\%Prog_Dir%\%Sub_Dir%\uninst.exe""" /SILENT"

or still write like that?

[RunUninst]
"""%16422%\%Prog_Dir%\%Sub_Dir%\uninst.exe"" /SILENT"

I mean how many pairs quotation marks added to the executable path are decided by the deepth of dir or only need two pairs .

Link to comment
Share on other sites

If mine does not execute the program go ahead and add another quote, if it worked your way thats then thats the correct amount of quotes ;)

Quotes may only be needed btw for the second runpost/presetupcommand actually, this should work just fine

%16422%\%Prog_Dir%\%Sub_Dir%\uninst.exe /SILENT;quotes not needed in the first path

%16422%\%Prog_Dir%\%Sub_Dir%\uninst.exe /SILENT """%16422%\%Prog_Dir%\%Sub_Dir%\Example.ini""";quotes are needed in second path

OH and the quotes are only needed/used for paths with spaces in them, example

"Program(space)Files\etc"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...