dukew74 Posted January 23, 2011 Share Posted January 23, 2011 My problem is the shortcuts do not delete after uninstalling.[Version]Signature=$Windows NT$[DefaultInstall]RegisterDLLs=Start.Register[Install]OptionDesc =%AppName%Tip =%INFOTIP%Modes =0,1,2,3ProfileItems =TrayCD.Shortcut1,TrayCDReadMe.Shortcut2CopyFiles =Program.Files, @TrayCD.infAddReg =AddRegSection[Optional Components]TrayCD[TrayCD]OptionDesc =%AppName%Tip =%INFOTIP%Modes =0,1,2,3ProfileItems =TrayCD.Shortcut1,TrayCDReadMe.Shortcut2CopyFiles =Program.FilesAddReg =AddRegSection[UninstallTrayCD]BeginPrompt =BeginUnInsPromptEndPrompt =EndUnInsPromptRunPreSetupCommands =CloseProgram:1DelFiles =Program.Files, PNF.FileDelDirs =DelDirsSectionDelReg =DelRegSectionProfileItems =TrayCD.DelShortcut1,TrayCDReadMe.DelShortcut2[BeginUnInsPrompt]Title = %TitleUnInsPrompt%Prompt = %BeginUnInsPrompt%ButtonType =YESNO[EndUnInsPrompt]Prompt = %EndUnInsPrompt%[SourceDisksNames]1="TrayCD Files","TrayCD.cab",,"i386"[DestinationDirs]Program.Files =16422,"%TrayCD%"PNF.File =17DefaultDestDir =17[PNF.File]TrayCD.PNFTrayCD.inf[SourceDisksFiles]Tray_CD.exe =1Readme.htm =1[Program.Files];Program files to delete, will not work without a DestinationDir;The ",1" flag is used if the file is in use, so entries will be added to the registry to delete it on next boot.Readme.htmTray_CD.exe[Create.EmptyDirectorys][AddRegSection]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","TrayCD",0x0,"""%16422%\Utilities\Tray CD\Tray_CD.exe"""HKLM,"%Uninstall%\%AppName%","DisplayName",0,"%AppName%"HKLM,"%Uninstall%\%AppName%","DisplayVersion",0,"%Version%"HKLM,"%Uninstall%\%AppName%","UninstallString",0,"rundll32.exe advpack.dll,LaunchINFSection TrayCD.inf,UninstallTrayCD"HKLM,"%Uninstall%\%AppName%","Comments",0x0,"Opens or closes CD's from the tray"HKLM,"%Uninstall%\%AppName%","DisplayIcon",0x0,"%16422%\Utilities\TrayCD\Tray_CD.exe"HKLM,"%Uninstall%\%AppName%","NoModify",0x10001,01,00,00,00HKLM,"%Uninstall%\%AppName%","NoRepair",0x10001,01,00,00,00HKLM,"%Uninstall%\%AppName%","Publisher",0x0,"RJL Software"HKLM,"%Uninstall%\%AppName%","URLInfoAbout",0x0,"http://www.rjlsoftware.com/"[TrayCD.Shortcut1]Name =TrayCD,0x00000008,23SubDir ="%TrayCD%"IconPath =16422,"%TrayCD%","Tray_CD.exe"CmdLine =16422,"%TrayCD%","Tray_CD.exe"WorkingDir =16422,"%TrayCD%"InfoTip ="%INFOTIP%"[TrayCDReadMe.Shortcut2]Name =TrayCD ReadMe,0x00000008,23SubDir ="%TrayCD%"IconPath = 16422,"Internet Explorer",iexplore.exe,002IconIndex = 2CmdLine =16422,"%TrayCD%","TrayCD.htm"WorkingDir =16422,"%TrayCD%"InfoTip ="TrayCD ReadMe"[Start.Register]11,,rundll32.exe,,,"advpack.dll,LaunchINFSection %1%\TrayCD.inf,Install"[DelDirsSection]%16422%\%TrayCD%[DelRegSection]HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","TrayCD",0x0,"""%16422%\Utilities\Tray CD\Tray_CD.exe"""HKLM,"%Uninstall%\%AppName%"[TrayCD.DelShortcut1]Name =Tray CD,0x0000000A,23SubDir ="%TrayCD%"[TrayCDReadMe.DelShortcut2]Name =Tray CD ReadMe,0x0000000A,23SubDir ="%TrayCD%"[CloseProgram]TASKKILL /F /IM Tray_CD.exeTSKILL Tray_CD.exe[Strings]AppName = "TrayCD"INFOTIP = "Opens or closes CD's from the tray"Version = "1.0.6.0"TitleUnInsPrompt = "TrayCD Uninstaller"BeginUnInsPrompt = "Are you sure, that you want TrayCD and all components deleted?"EndUnInsPrompt = "TrayCD has been successfully deleted."TrayCD = "Utilities\TrayCD"Uninstall = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted January 23, 2011 Share Posted January 23, 2011 [TrayCD.DelShortcut1]Name =Tray CD,0x0000000A,9SubDir ="%TrayCD%"[TrayCDReadMe.DelShortcut2]Name =Tray CD ReadMe,0x0000000A,9SubDir ="%TrayCD%"Use the value of "9" Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted January 23, 2011 Share Posted January 23, 2011 SOrry I quoted the wrong value!0x00000008,23reference sheethttp://www.wincert.net/forum/index.php?/topic/1904-tutorial-exotic-inf-profileitemsshortcuts/ Link to comment Share on other sites More sharing options...
ricktendo Posted January 23, 2011 Share Posted January 23, 2011 Try with 0xA,23 Link to comment Share on other sites More sharing options...
dukew74 Posted January 23, 2011 Author Share Posted January 23, 2011 Thanks for the tips guys but nothing has worked so far.I have tried 0x0000000A,90xA,230x00000002,23 < Microsoft says this should workI have also tried [DelDirsSection]%16407%\%TrayCD% < Microsoft says this should work also Link to comment Share on other sites More sharing options...
Geej Posted January 24, 2011 Share Posted January 24, 2011 (edited) Workaround method(add this section into your inf)[UninstallTrayCD];ProfileItems =TrayCD.DelShortcut1,TrayCDReadMe.DelShortcut2RunPostSetupCommands =Delete.shortcut:1[Delete.shortcut]cmd.exe /c rd /s /q """%allusersprofile%\Start Menu\Programs\Utilities"""[CloseProgram]TASKKILL /F /IM """Tray_CD.exe"""TSKILL """Tray_CD"""-----Edit------Found your problem. Your original shortcut name contains space, Tray CD, Remove the space and should work now.[TrayCD.DelShortcut1]Name ="TrayCD",0x0000000A,23 ;<- your original shortcut name contains space, Tray CDSubDir ="%TrayCD%"[TrayCDReadMe.DelShortcut2]Name ="TrayCD ReadMe",0x0000000A,23 ;<- your original shortcut name contains space, Tray CD Edited January 24, 2011 by Geej Link to comment Share on other sites More sharing options...
dukew74 Posted January 24, 2011 Author Share Posted January 24, 2011 Workaround method(add this section into your inf)[UninstallTrayCD];ProfileItems =TrayCD.DelShortcut1,TrayCDReadMe.DelShortcut2RunPostSetupCommands =Delete.shortcut:1[Delete.shortcut]cmd.exe /c rd /s /q """%allusersprofile%\Start Menu\Programs\Utilities"""[CloseProgram]TASKKILL /F /IM """Tray_CD.exe"""TSKILL """Tray_CD"""-----Edit------Found your problem. Your original shortcut name contains space, Tray CD, Remove the space and should work now.[TrayCD.DelShortcut1]Name ="TrayCD",0x0000000A,23 ;<- your original shortcut name contains space, Tray CDSubDir ="%TrayCD%"[TrayCDReadMe.DelShortcut2]Name ="TrayCD ReadMe",0x0000000A,23 ;<- your original shortcut name contains space, Tray CDThank You very much GeejThe space was the problem, I knew you could have spaces in the shortcut names without quotes but after you said remove it I checked for the 50th time and saw the add and delete did not match.Problem solved, I will keep in mind your post setup command for future problems as well Link to comment Share on other sites More sharing options...
ricktendo Posted January 24, 2011 Share Posted January 24, 2011 DOH!, right in front of us Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now