Re: How to create a relative shortcut ?

Jakob Bohm <[email protected]> Thu, 4 Sep 2025 10:19:50 +0200
Newsgroups comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general
Organization Privat
Message-ID <[email protected]>
On 2025-09-04 08:22, R.Wieser wrote:
> Shugo,
> 
>> so you have to add these 2 flags
>>
>> SLDF_FORCE_NO_LINKINFO
>> SLDF_FORCE_NO_LINKTRACK
> 
> I did, and saw no difference.
> 
> Thats the problem with "just do it" suggestions.  Without test cases and/or
> description *when* those flags should have effect its rather hard to check
> (w|t)hat they actually do. :-(
> 
> 
> But have you noticed this :
> 
> "Deleting those two pieces of information means that the shell cannot use
> them to help find the shortcut.
> 
> *If the file doesn't exist at the specified absolute path*,
> 
> then the relative path will be applied to the location of the shortcut
> itself, and the shell will look for the file at the resulting location"
> 
> (bolding mine)
> 
> That means that the "its now relative" trick will only work when the
> origional target file isn't there anymore.
> 
> Now imagine copying a folder-tree, containing a document and a shortcut to
> it, to somewhere else , and than double-clicking the copied shortcut to edit
> the also just copied document.
> 
> You won't like the result. :-|
> 

Indeed, and that is why I always disable the "Distributed Link Tracking" 
services in Windows installations that contain them, as those services 
exist only to produce the same wrong result for links within OLE2-style 
documents (a concept which includes MS Office 9x, Explorer shell 
shortcut files etc. etc.) .

   Enjoy

   Jakob

-- 
Jakob Bohm, MSc.Eng., I speak only for myself, not my company
This public discussion message is non-binding and may contain errors
All trademarks and other things belong to their owners, if any.