Jump to content

[HELP] Shortcut creation problem


Uncle_Gadget

Recommended Posts

First of all a BIG thanks to this forum for the great information provided on helping

me 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,11
CmdLine =16422,%InstallDir%,%MCPL%
SubDir =%SysUtilDir%
WorkingDir =16422,%InstallDir%
InfoTip =%MasterCP_Tip%

[W7MasterCP.DelShortcut]
Name =Master Control Panel,0x0000000A,11
SubDir =%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 by Uncle_Gadget
Link to comment
Share on other sites

You gotta love it! After days of searching for a solution and

trying everything I could think of, I discovered a solution less

than 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,11
CmdLine =16422,%InstallDir%\%MCPL%,""
SubDir =%SysUtilDir%
WorkingDir =16422,%InstallDir%
InfoTip =%MasterCP_Tip%

[W7MasterCP.DelShortcut]
Name =Master Control Panel,0x0000000A,11
SubDir =%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."

Link to comment
Share on other sites

  • 8 months later...

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 fine

More here

I 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!

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...