Re: How to create a relative shortcut ?

"R.Wieser" <[email protected]> Wed, 3 Sep 2025 13:26:06 +0200
Newsgroups comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general
Organization A noiseless patient Spider
Message-ID <[email protected]>
J.P. ,

> But I don't know - if the "Start in" field is not filled in, does the
> shortcut [or, perhaps more accurately, whatever's processing it]
> assume it is in some prefefined location, such as %windows%\system32
> or something like that, rather than where the shortcut actually is?

Using IShellLink to create the shortcut I get the root-of-roots, the desktop 
folder.  And I can't edit the shortcuts target and working-directory 
properties anymore (the fields are grayed out).  Why ?  Good question.

>> If the shortcut icon uses an absolute path, then it can be copied
>> or moved anywhere.
>
> Yes, but that's not "relative".

Indeed.  Paul just tried to tell me why using an absolute path is the best 
idea ever and I should not want anything else.

> R didn't say _why_ he wanted "relative shortcuts":

:-)  You even quoted the reason in your post ! :

[quote=me, initial post]
(for use on a removable USB harddisk)
[/quote]

> all I could think of was that he wanted to be able to move/copy an entire
> structure - shortcuts and targets - to a different location (say, another
> machine, or a memory stick or external drive which might have a
> different letter at times).

Or move to another location on the same drive, or to another drive on the 
same 'puter.  All examples where relative shortcuts would be usefull.

Regards,
Rudy Wieser