home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,068 of 17,273   
   Schugo to R.Wieser   
   Re: How to create a relative shortcut ?   
   06 Sep 25 18:58:35   
   
   XPost: comp.os.ms-windows.programmer.win32, alt.windows7.general   
   From: schugo@schugo.de   
      
   On 05.09.2025 21:05, R.Wieser wrote:   
   > "R.Wieser" wrote :   
   >   
   >> Hello all,   
   >>   
   >> I'm trying to create relative shortcuts* (for use on a removable USB   
   >> harddisk) and can't seem to find out how it works.   
   >   
   > It looks like I ran head-first into some "over-engenering".  :-(   
   >   
   > As I could not find any way to create a relative shortcut using the   
   > IShellLink object, I took a better look at the Shortcut file itself. And   
   > going on a hunch, I was able to solve the problem in the most basic way ever   
   > : by manually creating a shortcut file.   
   >   
   > It turns out that writing the header with only the "HasRelativePath" flag   
   > set and than the desired (counted-length) relative path followed by four   
   > bytes all Zero (as the end of extras list of blocks) does the trick.   
   >   
   > Adding other strings (arguments, working directory, description) the same   
   > way also works.   
   >   
   > One downside though : when going into the properties and changing the target   
   > causes the shortcut to revert to its normal, absolute paths format.   
   >   
   > ... At least, here on my XPsp3 machine.   
      
   congrats! good to know.   
      
   ciao..   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca