Audigy Posted August 1, 2008 Posted August 1, 2008 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 ieC:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program NameSo how do I remove the shortcuts when the program is uninstalled. I could change the default install directory, but is there another way, now that I have created the addons?Thanx inadvance Quote
bjfrog Posted August 2, 2008 Posted August 2, 2008 (edited) 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 ieC:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program NameSo how do I remove the shortcuts when the program is uninstalled. 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.infAddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddRegRegisterDLLs=UltraISOShell.DllsProfileItems =UltraISO.AddShortcut[UltraISO]OptionDesc ="UltraISO Premium Edition"Tip ="UltraISO Premium Edition Addon"Modes =0,1,2,3CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.FilesAddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddRegRegisterDLLs=UltraISOShell.DllsProfileItems =UltraISO.AddShortcut[SourceDisksNames.x86]1="UltraISO Files","UltraISO.cab",,"i386"[DestinationDirs]UltraISO.Files =16422,UltraISOlang.Files =16422,UltraISO\langdrivers.files =16422,UltraISO\driversCommon.Files =16422,Common Files\EZB Systems[SourceDisksFiles]History.txt =1isoshell.dll =1License.txt =1Readme.txt =1ultraiso.chm =1UltraISO.exe =1ultraiso.ico =1unins000.dat =1unins000.exe =1lame_enc.dll =1ISODrv64.sys =1IsoCmd.exe =1ISODrive.sys =1lang_cn.dll =1lang_jp.dll=1[UltraISO.Files]Readme.txtultraiso.chmUltraISO.exeultraiso.icounins000.datunins000.exeHistory.txtisoshell.dllLicense.txt[lang.Files]lang_cn.dlllang_jp.dll[Common.Files]lame_enc.dll[Drivers.Files]ISODrv64.sysIsoCmd.exeISODrive.sys[UltraISO.AddShortcut]Name =UltraISOCmdLine =16422,UltraISO,UltraISO.exeSubDir =MyAPP\UltraISOWorkingDir =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",0x0HKLM,"%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,00HKLM,"%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,0x00000002SubDir=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 August 3, 2008 by bjfrog Quote
ricktendo Posted August 2, 2008 Posted August 2, 2008 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 ieC:\Documents and Settings\All Users\Start Menu\Programs\My Programs\Utilities\Program NameSo how do I remove the shortcuts when the program is uninstalled. 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 Quote
Audigy Posted August 3, 2008 Author Posted August 3, 2008 Please post your ProfileItems so we can see themI 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,SoftledsI just need some way to deleted these shortcuts when the programs get uninstalled. Quote
ricktendo Posted August 3, 2008 Posted August 3, 2008 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 =RunUninstDelFiles = ShortcutOH 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.infAddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddRegRegisterDLLs=UltraISOShell.DllsProfileItems =UltraISO.AddShortcut[UltraISO]OptionDesc ="UltraISO Premium Edition"Tip ="UltraISO Premium Edition Addon"Modes =0,1,2,3CopyFiles =UltraISO.Files,lang.Files,drivers.files,Common.FilesAddReg =UltraISOInstall.AddReg,USERSettings.AddReg,UltraISOUninstall.AddRegRegisterDLLs=UltraISOShell.DllsProfileItems =UltraISO.AddShortcut[SourceDisksNames.x86]1="UltraISO Files","UltraISO.cab",,"i386"[DestinationDirs]UltraISO.Files =16422,UltraISOlang.Files =16422,UltraISO\langdrivers.files =16422,UltraISO\driversCommon.Files =16427\EZB Systems ;<-Fixed common files flag[SourceDisksFiles]History.txt =1isoshell.dll =1License.txt =1Readme.txt =1ultraiso.chm =1UltraISO.exe =1ultraiso.ico =1unins000.dat =1unins000.exe =1lame_enc.dll =1ISODrv64.sys =1IsoCmd.exe =1ISODrive.sys =1lang_cn.dll =1lang_jp.dll=1[UltraISO.Files]Readme.txtultraiso.chmUltraISO.exeultraiso.icounins000.datunins000.exeHistory.txtisoshell.dllLicense.txt[lang.Files]lang_cn.dlllang_jp.dll[Common.Files]lame_enc.dll[Drivers.Files]ISODrv64.sysIsoCmd.exeISODrive.sys[UltraISO.AddShortcut]Name =UltraISOCmdLine =16422,UltraISO,UltraISO.exeSubDir =MyAPP\UltraISOWorkingDir =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 alsoHKLM,"%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",0x0HKLM,"%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 neededHKLM,"%UNINST%","NoModify",0x10001,1HKLM,"%UNINST%","NoRepair",0x10001,1; You should add a uninstall prompt to this section now that the uninstaller is silent[Uninstall]RunPreSetupCommands =RunUninstProfileItems=UltraISO.DelShortcut[RunUninst]"""%16422%\UltraISO\unins000.exe"" /SILENT";<-made silent[UltraISO.DelShortcut]Name =UltraISO,0x00000002SubDir=MyAPP\ULTRAISO[Strings]UNINST="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\UltraISO_is1"SEU5="Software\EasyBoot Systems\UltraISO\5.0"VER="V9.30"NAME="LiuHongWei"SN="" Quote
Audigy Posted August 3, 2008 Author Posted August 3, 2008 Thanx for your reply ricktendo64, but I am a bit unsure... 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.AddRegCopyfiles =VirDir.Files,Help.Files,VirDir.Shortcut[VirDir]OptionDesc ="VirDir"Tip ="Create Virtual Drive"Modes =0,1,2,3AddReg =VirDir.AddRegCopyfiles =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=1dw.css=1irunin.bmp=1irunin.dat=1irunin.ini=1irunin.lng=1shim.gif=1virdir.exe=1help.htm=1VirDir.lnk=1[VirDir.Files]irunin.bmpirunin.datirunin.iniirunin.lngvirdir.exevirdir_help.htm,help.htm[Help.Files]banner.jpgdw.cssshim.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",,0x10HKLM,"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 ManagerVirHelp=VirDir Manager\virdir_help_files Quote
ricktendo Posted August 3, 2008 Posted August 3, 2008 This should do it[Version]Signature="$Windows NT$"[Optional Components]VirDir[DefaultInstall]AddReg =VirDir.AddRegCopyfiles =VirDir.Files,Help.Files,VirDir.Shortcut[VirDir]OptionDesc ="VirDir"Tip ="Create Virtual Drive"Modes =0,1,2,3AddReg =VirDir.AddRegCopyfiles =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=1dw.css=1irunin.bmp=1irunin.dat=1irunin.ini=1irunin.lng=1shim.gif=1virdir.exe=1help.htm=1VirDir.lnk=1[VirDir.Files]irunin.bmpirunin.datirunin.iniirunin.lngvirdir.exevirdir_help.htm,help.htm[Help.Files]banner.jpgdw.cssshim.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",,0x10HKLM,"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.UninstallerDelFiles =VirDir.ShortcutRunPostSetupCommands=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 ManagerVirHelp=VirDir Manager\virdir_help_files Quote
Audigy Posted August 3, 2008 Author Posted August 3, 2008 Thanx alot for this ricktendo64 I will give it a go when I get home... Quote
bjfrog Posted August 4, 2008 Posted August 4, 2008 Rick,Thank you very much!if the uninstall executable path like this %16422%\%Prog_Dir%\%Sub_Dir%\uninst.exeDoes 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 . Quote
ricktendo Posted August 4, 2008 Posted August 4, 2008 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 pathOH and the quotes are only needed/used for paths with spaces in them, example"Program(space)Files\etc" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.