Platform SDK Shell >> Can a shortcut point to a relative location?

by Joseph Geretz » Wed, 05 Jan 2005 11:20:21 GMT

Hi,

Can I encode a shortcut to point to an executable file which is relative to
the shortcut itself? I have a program on a JumpDrive and I'd like to have a
shortcut at the root of the JumpDrive link to the program which is in a
subordinate folder. However, hardcoding the shortcut to point to
<drive>:\<path>\<file> doesn't work for me since the JumpDrive mounts as a
different drive letter on different systems.

(I apologize if this is off topic for this group. I didn't see a general
group for Windows shell issues and I figured that participants in this group
would have the requisite knowledge to get the job done, if at all possible.)

Thanks for your help,

- Joe Geretz -




Platform SDK Shell >> Can a shortcut point to a relative location?

by Jim Barry » Thu, 06 Jan 2005 09:00:43 GMT





This has been asked quite a few times before and unfortunately the answer is "no". However, the shortcut resolver should cope reasonably well with a simple change of drive letter - give it a try. Otherwise you will have to use a batch file or write a small program that generates the required full path and passes it to ShellExecute.

--
Jim Barry, MVP for Windows SDK