S
(Shovel)
Guest
I though I was on to something with this... erm, no such luck though, as I shall explain. This may be of some interest to some of you though, so I'll just write this up to let you know.
Many (most?) of the Tech Forum regs will be familar with symbolic links in *nix - on an external level it allows you to jump from one part of the system to another transparently. I think a similar effect can be implemented by mounting various separate parts of the filesystem to folders within itself. That is *nix though.
A while back I was attempting to move the entire "Documents and Settings" folder from the default C:\ partition to a separate disk on XP Home. The installation doesn't allow anything clever in this respect, you just have to do as you're told, so you load up with your first user account stuck on the C:\. You can aparently use a registry tool to rename every reference to C:\Documents and Settings to a different path, but this has issues and is not bullet proof. Absence from Windows is the above mentioned "synbolic links" - or so I thought.
Enter a Windows 2000 Resource Kit program called "linkd.exe". I have no idea whether it is Microsoft or not, though it may as well be. It's a sensible command line tool taking a minimum of arguments:
Visually, it creates a folder (Source) and makes it physically point to the path "Destination". This is not a Windows shell shortcut type either, it's all based in the lower reaches of the NTFS file system - therefore it is fairly transparent to Windows. Well, almost.
Here's a demonstration:
If I now go to the root of D, and dir I get fed:
Windows does recognise it then, it's a "Junction" aparently. I'm yet to hunt through Microsoft Technet to see whether they acknowledge the existance of Junctions, but as a "useful future prospect" I think it ranks highly.
And so to the enevitable downfall...
Using linkd.exe, a fresh install of XP Home, an aquired copy of the Windows XP OEM Preinstallation Environment CD (this boots a WinXP Pro Command Prompt, stand alone from any installed system). I booted to the OEMPE to copy my user files from "C:\Documents and Settings" to the root of D:\ (xcopy is a fantastic little tool with the /h modifier to copy hidden and system files).
Then, I removed the "Documents and Settings" directory. Now, using linkd as above, I create a Junction called "C:\Documents and Settings" and make it point to D:\.
If I cd to C:\Documents and Settings, the path reads "C:\Documents and Settings", and it's as if it is a folder on the C: Drive. So far, so clever.
Reboot into the installed XP system and it logs in seemlessly, as if XP didn't even know the difference, and I'd argue that it probably doesn't.
I don't know what the performace hit is like - e.g. I don't know how much processing is involved to link from one place to another. It's done in the File System, rather than a response by the Windows shell, so it should be pretty quick - well, comparatively.
Initially it worked - I could browse "C:\Documents and Settings" as if nothing had changed, safe in the knowledge that it was jumping to my second disk transparently. However, there's BIG problems.
It works fine when browsing in Explorer, you can create, open and delete files as normal. However, there appears to big a bug with deleting folders. At every attempt it reports "Access Denied". Going to to true path on D:\ had no issues with deleting though.
Then I came to install some drivers into my fresh system. On go some Detenator FX, then reboot when prompted. Sadly, the machine wouldn't boot. It froze on the startup screen. Going back into the OEMPE and carefully putting everything back how it was let me boot up again, again as if nothing had changed, but minus my once seemless Junction.
This probably all seems a bit pointless now, seeing as I've written an awful lot and then told you all that it doesn't work after all. There's a reason for it. Firstly, have any others come across Junctions before? And does anyone know if MS are actually going to implement them fully in the future?
I think that maybe they may still be of some use, but not for system critical operation like "Documents and Settings" and "Program Files".
If anyone is interested in seeing if my problems are the rule, rather than exceptional, linkd.exe is available in various places, though I sourced it from: http://www.dynawell.com/reskit/microsoft/win2000/linkd.zip
The source page: http://www.dynawell.com/support/ResKit/win2k.asp is packed full of admin level utilities for NT5.x (2000/XP) tweaking. I've not played with the others yet though.
I hope this interested someone, cause I think I've just written far to much for something that doesn't work right...
Many (most?) of the Tech Forum regs will be familar with symbolic links in *nix - on an external level it allows you to jump from one part of the system to another transparently. I think a similar effect can be implemented by mounting various separate parts of the filesystem to folders within itself. That is *nix though.
A while back I was attempting to move the entire "Documents and Settings" folder from the default C:\ partition to a separate disk on XP Home. The installation doesn't allow anything clever in this respect, you just have to do as you're told, so you load up with your first user account stuck on the C:\. You can aparently use a registry tool to rename every reference to C:\Documents and Settings to a different path, but this has issues and is not bullet proof. Absence from Windows is the above mentioned "synbolic links" - or so I thought.
Enter a Windows 2000 Resource Kit program called "linkd.exe". I have no idea whether it is Microsoft or not, though it may as well be. It's a sensible command line tool taking a minimum of arguments:
Code:
linkd Source Destination
Visually, it creates a folder (Source) and makes it physically point to the path "Destination". This is not a Windows shell shortcut type either, it's all based in the lower reaches of the NTFS file system - therefore it is fairly transparent to Windows. Well, almost.
Here's a demonstration:
Code:
D:\bmpw\Documents\Resources\Resource>linkd D:\Linkd E:\
Link created at: D:\Linkd
If I now go to the root of D, and dir I get fed:
Code:
D:\>dir
Volume in drive D is FILES
Volume Serial Number is 9CB4-8421
Directory of D:\
02/06/2003 22:42 <DIR> All Users
02/06/2003 22:41 <DIR> bmpw
02/06/2003 17:54 <DIR> Lin
03/06/2003 00:43 <JUNCTION> Linkd
0 File(s) 0 bytes
4 Dir(s) 6,073,053,184 bytes free
D:\>
Windows does recognise it then, it's a "Junction" aparently. I'm yet to hunt through Microsoft Technet to see whether they acknowledge the existance of Junctions, but as a "useful future prospect" I think it ranks highly.
And so to the enevitable downfall...
Using linkd.exe, a fresh install of XP Home, an aquired copy of the Windows XP OEM Preinstallation Environment CD (this boots a WinXP Pro Command Prompt, stand alone from any installed system). I booted to the OEMPE to copy my user files from "C:\Documents and Settings" to the root of D:\ (xcopy is a fantastic little tool with the /h modifier to copy hidden and system files).
Then, I removed the "Documents and Settings" directory. Now, using linkd as above, I create a Junction called "C:\Documents and Settings" and make it point to D:\.
If I cd to C:\Documents and Settings, the path reads "C:\Documents and Settings", and it's as if it is a folder on the C: Drive. So far, so clever.
Reboot into the installed XP system and it logs in seemlessly, as if XP didn't even know the difference, and I'd argue that it probably doesn't.
I don't know what the performace hit is like - e.g. I don't know how much processing is involved to link from one place to another. It's done in the File System, rather than a response by the Windows shell, so it should be pretty quick - well, comparatively.
Initially it worked - I could browse "C:\Documents and Settings" as if nothing had changed, safe in the knowledge that it was jumping to my second disk transparently. However, there's BIG problems.
It works fine when browsing in Explorer, you can create, open and delete files as normal. However, there appears to big a bug with deleting folders. At every attempt it reports "Access Denied". Going to to true path on D:\ had no issues with deleting though.
Then I came to install some drivers into my fresh system. On go some Detenator FX, then reboot when prompted. Sadly, the machine wouldn't boot. It froze on the startup screen. Going back into the OEMPE and carefully putting everything back how it was let me boot up again, again as if nothing had changed, but minus my once seemless Junction.
This probably all seems a bit pointless now, seeing as I've written an awful lot and then told you all that it doesn't work after all. There's a reason for it. Firstly, have any others come across Junctions before? And does anyone know if MS are actually going to implement them fully in the future?
I think that maybe they may still be of some use, but not for system critical operation like "Documents and Settings" and "Program Files".
If anyone is interested in seeing if my problems are the rule, rather than exceptional, linkd.exe is available in various places, though I sourced it from: http://www.dynawell.com/reskit/microsoft/win2000/linkd.zip
The source page: http://www.dynawell.com/support/ResKit/win2k.asp is packed full of admin level utilities for NT5.x (2000/XP) tweaking. I've not played with the others yet though.
I hope this interested someone, cause I think I've just written far to much for something that doesn't work right...