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,054 of 17,273    |
|    Jakob Bohm to R.Wieser    |
|    Re: How to create a relative shortcut ?    |
|    04 Sep 25 09:17:59    |
      XPost: comp.os.ms-windows.programmer.win32, alt.windows7.general       From: egenagwemdimtapsar@jbohm.dk              On 2025-09-03 13:26, R.Wieser wrote:       > 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.       >              The per-user Desktop is only the "root-of-roots" in the Windows       95-inspired shell object model . In the real NT-based operating systems       such as Windows NT 3.x, Windows 2000 or Windows 11, the root-of-roots is       the empty root of the NT kernel object naming system, which contains a       folder named "\??" with symlinks like "\??\C:" This root is only       accessible using the low level NTDLL.DLL APIs and the driver programming       kernel APIs, such as ZwCreateFile() etc.              >>> 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       >       >              One thing to consider is that removable hard drives can be formatted       with almost any OS supported file system, including the NTFS version       used for Windows NT 6.0x (Vista/Win7/Win8/Win8.1 for x=0/1/2/3), which       happens to support relative file system symlinks, but subject to the       arbitrary rule that to create an on-disk NTFS symlink, a user needs the       special privilege to create kernel namespace symlinks such as "\??\C:" .              Significantly older NTFS versions only supported absolute symlinks in       the form of "junctions", which were stored on disk in terms of the       kernel namespace name of the drive containing the target directory       (junctions cannot link to files), but I don't remember the exact cut-off       OS version that introduced general NTFS symlinks, which may be different       from the version that added mklink and other UI support.                      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.              --- 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