User Folder Redirection with Unattended XP Install
#1
Posted 18 October 2004 - 06:13 AM
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
#2
Posted 18 October 2004 - 06:51 AM
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
#3
Posted 18 October 2004 - 06:58 AM
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)
#4
Posted 18 October 2004 - 07:17 AM
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!
#5
Posted 18 October 2004 - 07:34 AM
Good to know that it works at cmdlines. I'll be most definately looking into implementing something like that soon
#6
Posted 18 October 2004 - 09:11 AM
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.
#7
Posted 18 October 2004 - 09:16 AM
#8
Posted 18 October 2004 - 03:11 PM
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
#9
Posted 18 October 2004 - 06:28 PM
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\"
#10
Posted 20 October 2004 - 04:42 AM
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
#11
Posted 20 October 2004 - 05:03 AM
#12
Posted 20 October 2004 - 05:04 AM
You will also need to reboot your system.
#13
Posted 20 October 2004 - 05:08 AM
#14
Posted 20 October 2004 - 05:12 AM
Of course it also works okay with %USERPROFILE%\Desktop, but the profiles directories in my case were done using the winnt.sif
#15
Posted 20 October 2004 - 05:19 AM
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
#16
Posted 22 October 2004 - 06:51 AM
user
user.computername
user.computername.000
user.computername.001
... etc...
it also creates user~1~com, userco~1~000 containing the local settings folder.
The problem is now that all my original settings is in the user-folder, but XP makes short-cuts (from the start-menu etc.) to the latest created folder - here user.computername.001 - which dosn't contains my old documents.
So - everybody out there reading this post - is there a way to make an unattended install which uses a predefined username (Nigo for me) and makes use of the old folder "D:\Documents and Settings\Nigo" of cause with out overwriting my data?
#17
Posted 26 October 2004 - 07:54 AM
Yzöwl, on Oct 19 2004, 01:28 AM, said:
Hi! First of all thank's a lot for your good explanation! It has been really useful for me!
Here's just a link to an external site with similar explanations for those who might need it: http://www.indigoros...read.php?t=5012
#18
Posted 23 October 2006 - 12:05 PM
I wan to have admin user shell folder 'Temporary Internet Files' in %SYSTEMDRIVE%, not in those s***ty profile's dir...
PLS HELP ME! :-(
- ← GUIRunOnceEX Help
- Unattended Windows 2000/XP/2003
- IE6 hotfixes that can be removed with useing IE7 →



Help
Back to top









