2012/06/01

Windows Shortcuts With Relative Path

Problem

You cannot use the relative path to executable in shortcuts (under Windows OS).

Solution

It's doable with a little help of the "start" command in Windows shell.

Example

We have the "MobileFolder" and we want to have shortcuts in it to some apps located in different sub-folders, which will works even if the "MobileFolder" will be moved to different location. Or the "MobileFolder" is on USB disk, which on different PCs can have assigned different drive letter.






Set...
Full Target: %WinDir%\System32\cmd.exe /c start "App1" "Apps\App1\procexp.exe"
Start in: <empty>
Run: Minimized (for not occurring the command line window even on a fraction of a second)

You can "Change Icon..." of the shortcut to your desirable icon, but you have to choose only from system's built-in icons: %SystemRoot%\system32\SHELL32.dll