Jump to content

User Folder Redirection with Unattended XP Install


Recommended Posts

OK,

so I have a DVD which contains XP SP2, my complete list of applications, internet favourites, registry tweaks, themes, blah de blah de blah... and I can install / format reinstall with no problems whatsoever. EXCEPT ONE.

We all know that for some reason XP tends to get craggy and slow over time, and so once in a while, you need to start with a fresh install. So I can do that. But my problem has to be how to manage your existing user data. Normally, its a tragic and painful slow manual process to find all the data from each of your user profiles on the pc, pull it into a central folder, back up the folder, then reinstall, followed by pushing that data back.

Alternatively, use USMT. Well OK, if it was more reliable I would. Last time I tried that, it was flaky, to say the least, plus it took ages to run, and you had to run it repeatedly under each user's new profile!

Now what I'm thinking would be a great idea, would be to split your disk up, so you have a say 40GB system partition, where the OS, apps etc reside, followed by a second partition of the remaining disk, where all user data would reside.

To do this, I guess we need to redirect all user folders. Simple, but where do I start?

Anyone ever attempted this, and have a conclusive list of which folders need to be redirected, and additionally, how to perform this redirection? I know that XP has a local group policy which I understand allows folder redirection, but I'm using Home, so I'm not sure if it exists in that version.

Anybody care to help with this?

Many Thanks

573310

Link to comment
Share on other sites


I've been thinking about this for quite a while too. I don't think changing the paths in the registry directly would help, or at least not for all of it. I think some of it comes back on it's own too (unsure)

I think one of the easiest way to do this would probably be making a vbscript that uses the (local PC's) WinNT:// user object to set the users' Profile Path property to say, D:\Docs\UserName or such. (and maybe some registry tweaking involved too).

It shouldn't be hard to do, and hopefully it would work. There might be some 3rd party apps or information on the web about this too. Haven't had the time to look much (and I got many other issues to fix on my disc first).

Also, that script would probably be best run early, so the subfolders created in MyDocs (my music, my ebooks, my whatevers) are properly created inside it.

Also, it would be good practice to check if D: (or whatever drive) exists first, too (not sure how you plan to handle the partitionning/formatting). Perhaps have a "opt-out" for the script altogether, or a way to confirm/change the path of the user's base home directory... Perhaps there's a setting to change so the new users' default home directory is moved too (registry entry most likely) So there's also a lot of other considerations and testing to do.

Instead, I just set it manually right now (in the user account's advanced tab). Doesn't really take that much time to do, and it sure beats having them all in "C:\Documents and Settings"

It could also be a way to create some users, set the accounts default properties too, stuff like that. Perhaps the app could find it's own "answer file" for the paths and such on a file stored onto a floppy or usb drive? ...

[edit] bucketbuster beat me at posting faster. If you can post any observations, findings, or results, it would be nice. I won't be back to see until wednesday (leaving on a trip today)

Link to comment
Share on other sites

Read this!

All you need to do with the posted redirect.inf is change the following in the [strings] section to something like:

   PERSONAL  = "your_drive_letter:\%USERNAME%\My Documents"
   PICTURES  = "your_drive_letter:\%USERNAME%\My Documents\My Pictures"
   FAVORITES = "your_drive_letter:\%USERNAME%\Favorites"
   MUSIC     = "your_drive_letter:\%USERNAME%\My Documents\My Music"

Hope this helps!

Link to comment
Share on other sites

It is really a good idea!!! I have been following it for years now. I have used a specific directory for entire of my modified data, the docs, photos, modified themes, application data settings (browser settings, templates, playlists), even my browser opera is in a fixed directory and I have added all the shortcuts required accessed by using hoekey or in quick launch and the registry modifications of the above mentioned registry settings help to keep all the shortcuts handy and I really don't have to add any of my existing shortcuts too. I further have made out a fixed directory of the temp environment, it is essentially in a separate partition and it houses the temporary internet folder and cache of opera too. This helps to check the overall thrashing of the disk and the directories can be cleaned easily without digging deep.

This process can be utilised without having to install your itsy bitsy utilities like power calculator, opera, clear tweak and innumerable others!!

The best part of this whole method is you can back up your data fairy easily by backing your folders which are located at one fine point only.

Link to comment
Share on other sites

That's a good idea as well. Common partition for the junk that creates that fragmentation. (temp files, caches and that sort of stuff). Easier to cleanup too I guess. (which reminds me, I'm currently looking for the best app to cleanup those type of things in one click to save me some time...)

Link to comment
Share on other sites

Hey Guys, Thanks for all the feedback, this is definately a hot topic. I'm just about to wade through some MS whitepapers on folder redirection to get a better understanding.

Yzöwl - that explanation and guide sound great - I'm not sure i understand exactly how or what its doing, so i'll have to spend some time understanding that, and trying it out. To be clear, this will redirect all the windows user profile locations - correct? All that would remain to redirect, would be third part application specific data folders.

Could you explain the process a little more, perhaps?

Thanks for all your help on here.

Thanks

573310

Link to comment
Share on other sites

Special folders include the My Documents, My Pictures, and Favorites folders, among many others.

Below is a list of special folders that Windows XP creates after a fresh installation and their default paths. The first column contains each folder's internal name as Windows XP and other programs know it. The second column contains each folder's default path, which almost always starts with %USERPROFILE%, making these folders part of each user's profile folder.

---------------------Special Folders

-------Name-----------------------Default path

AppData---------------%USERPROFILE%\Application Data

Cache-----------------%USERPROFILE%\Local Settings\Temporary Internet Files

Cookies---------------%USERPROFILE%\Cookies

Desktop---------------%USERPROFILE%\Desktop

Favorites--------------%USERPROFILE%\Favorites

History----------------%USERPROFILE%\Local Settings\History

Local AppData--------%USERPROFILE%\Local Settings\Application Data

Local Settings--------%USERPROFILE%\Local Settings

My Pictures-----------%USERPROFILE%\My Documents\My Pictures

NetHood--------------%USERPROFILE%\NetHood

Personal--------------%USERPROFILE%\My Documents

PrintHood-------------%USERPROFILE%\PrintHood

Programs-------------%USERPROFILE%\Start Menu\Programs

Recent----------------%USERPROFILE%\Recent

SendTo---------------%USERPROFILE%\SendTo

Start Menu-----------%USERPROFILE%\Start Menu

Startup---------------%USERPROFILE%\Start Menu\Programs\Startup

Templates-----------%USERPROFILE%\Templates

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders is the key where Windows XP stores the location of per-user special folders. Each value in this key is a special folder as shown above. These are REG_EXPAND_SZ values, so you can use environment variables in them. Use %USERPROFILE% in a path to direct the folder somewhere inside users' profile folders or %USERNAME% in a path to include users' names.

To redirect users' Favorites folders to the network, set the value Favorites, to \\Server\Share\%USERNAME%\Favorites, where \\Server\Share is the server and share containing the folders. The next time the user logs on, Windows XP updates a second key, HKCU\Software\Microsoft\Windows\CurrentVersion \Explorer\Shell Folders, with the paths from User Shell Folders, so you don't have to update it. In fact, Microsoft's documentation says Windows XP doesn't use Shell Folders.

The special folders in the above section are per-user and exist within users' profile folders. Windows XP also lists per-computer special folders in HKLM.

Examples of per-computer folders include Common AppData, Common Desktop, and Common Documents. It's not as useful to customize per-computer folders, but, the same rules apply. Change the location of the folder in User Shell folders and Windows XP automatically updates Shell Folders.

Although the simplest way I find to do this is to create a separate partition for the 'Documents and Settings' and redirect all this information, which includes the Local Settings\Temp & Temporary Internet Files, Recent Docs etc. to this upon installation. This is simply done by, as previously mentioned, adding the following to your winnt.sif file:

[GuiUnattended]
   ProfilesDir="your_drive_letter:\your_chosen_folder name\"

Link to comment
Share on other sites

Yzöwl,

thats brilliant - a great summary. So final question, I'm assuming that if I take an existing pre installed pc and amend those registry keys at the following location, all new users that logon to that pc will have their user profiles redirected -

HKEY_USER\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Is that correct? I want to try this out on my current build before I create the new build.

Many thanks for all your help with this.

Thanks

573310

Link to comment
Share on other sites

My profile directories are on other drives which is good. But if you type in %Userprofile%\Desktop in the run box. You will get an error. Because %UserProfile% seems to just %HomeDrive%%HomePath%. So to counteract, I create a short called Desktop where it used to be, pointing to the new location. I do this with the other folders also.

Link to comment
Share on other sites

Yes, you can always export the affected keys first...I have had slight problems with the Subfolders within My Docs sometimes not appearing when applying it to an existing system though...

You will also need to reboot your system.

Link to comment
Share on other sites

I just typed %USERPROFILE%\Recent into the run box, and got what I expected (from a different drive also).

Of course it also works okay with %USERPROFILE%\Desktop, but the profiles directories in my case were done using the winnt.sif

Link to comment
Share on other sites

Yzöwl - just testing the above on my other build - will let you know how that goes

MHZ - Thats a good question. If you have your data files on a secondary partition, and your OS on the primary partition, you simply need to ensure that you do not repartition during your unattended install. Instead only format and install on to the primary partition - that way you always install to c:\ drive, and your data on the second partition will remain fine, but as always, probably worth a quick backup of your data partition before you proceed - at least with the data seperated from your system partition, backups will be as simple as

on D:\ (data drive) ctrl+A; ctrl+C;

on X:\ (backup location on network) ctrl+V;

HTH

573310

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...