Uncle_Gadget Posted May 16, 2010 Posted May 16, 2010 (edited) First of all a BIG thanks to this forum for the great information provided on helpingme to learn the inf creation process. A special thanks to Ricktendo64 for his gift of sharing that knowledge.I am having one problem I have not been able to find a solution for - the problem of creating a shortcut for a file name or folder that contains spaces. I realize that there are 2 obvious workarounds (using the 8.3 file name or renaming the file), however neither of those options will work for me in all cases. For one, many people are turning off 8.3 file name creation (it's one of the recommended tweaks for SSD drives) and renaming the file often leads to other problems.I have tried using string replacement and playing with the quotation marks but none seems to work, especially the example below. Any help or suggestions would be greatly appreciated.[W7MasterCP.AddShortcut]Name =Master Control Panel,0x00000008,11CmdLine =16422,%InstallDir%,%MCPL%SubDir =%SysUtilDir%WorkingDir =16422,%InstallDir%InfoTip =%MasterCP_Tip%[W7MasterCP.DelShortcut]Name =Master Control Panel,0x0000000A,11SubDir =%SysUtilDir%[Strings]InstallDir ="ControlPanel Extender"SysUtilDir ="System Utilities"MCPL ="Master Control Panel.{ED7BA470-8E54-465E-825C-99712043E01C}"MasterCP_Tip ="Provides access to 100's of Windows settings and functions all in one place." Edited May 16, 2010 by Uncle_Gadget Quote
Uncle_Gadget Posted May 16, 2010 Author Posted May 16, 2010 You gotta love it! After days of searching for a solution and trying everything I could think of, I discovered a solution lessthan 10 minutes after leaving the question above.The code snippet below provides the answer for those that may be interested. Apparently the 'space' problem is only present in the file name field. By moving the file name to the directory section and placing double quotes for the file name, the system is 'fooled' into a solution.Thanks again, everyone, for the inspiration provided in this forum.[W7MasterCP.AddShortcut]Name =Master Control Panel,0x00000008,11CmdLine =16422,%InstallDir%\%MCPL%,""SubDir =%SysUtilDir%WorkingDir =16422,%InstallDir%InfoTip =%MasterCP_Tip%[W7MasterCP.DelShortcut]Name =Master Control Panel,0x0000000A,11SubDir =%SysUtilDir%[Strings]InstallDir ="ControlPanel Extender"SysUtilDir ="System Utilities"MCPL ="Master Control Panel.{ED7BA470-8E54-465E-825C-99712043E01C}"MasterCP_Tip ="Provides access to 100's of Windows settings and functions all in one place." Quote
ricktendo Posted May 16, 2010 Posted May 16, 2010 HA! Neet trickKinda reminds me of the trick to make shortcuts to folders Quote
Uncle_Gadget Posted January 18, 2011 Author Posted January 18, 2011 HA! Neet trickKinda reminds me of the trick to make shortcuts to foldersGotta love it! 8 months later and I'm back looking for.... youguessed it - How do you make a shortcut to a folder? Apparently Windows 7 is a bit more fussy than XP. Quote
ricktendo Posted January 18, 2011 Posted January 18, 2011 If you dont specify a IconPath and IconIndex (IconIndex is optional, only if you dont use the very first icon) the shortcut does not work, check out my DP BASE addon, I install it on Windows 7 and it works fineMore here Quote
Uncle_Gadget Posted January 18, 2011 Author Posted January 18, 2011 If you dont specify a IconPath and IconIndex (IconIndex is optional, only if you dont use the very first icon) the shortcut does not work, check out my DP BASE addon, I install it on Windows 7 and it works fineMore hereI actually had tried this method with no success. I then discovered why it wasn't working - the folder has to exist PRIOR to the creation of the shortcut or it won't work in Windows 7. Once that was completed all worked as expected.Thanks, again, Rick for your assistance! 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.