Page 1 of 1

Win 7 Profile Manipulation

Posted: Mon Jul 12, 2010 11:08 pm
by bphlpt
When you restore your Windows 7 image (either 32 or 64-bit) to a new computer, and create the new user account(s), do you have to bring up the properties of each user's data folders (Downloads, My Documents, My Music, My Pictures, My Videos, et cetera) and tell each one to move to a different path? Do you wish there were a way to move all personal data folders for all users to another location?

I'm VERY new to playing with Windows 7, but I've come up with something that works for me to do just what you were looking for.

This is a Command/Reg file combination that allows you to:

-----Change label of C: -> MyHD
-----Rename Current User Desktop Favorite -> Desk
-----Rename Current User libraries:
----------Documents -> Docs
----------Music -> Music
----------Pictures -> Pics
----------Videos -> Vids
----- Move Profiles -> D:
----------"ProfilesDirectory"="D:\Users"
----------"Public"="D:\Users\Public"
----- Move/Rename the following Public folders:
----------"Public\Downloads" -> D:\Users\Public\PubDown
----------"Public\Desktop" -> D:\Users\Public\PubDesk
----------"Public\Documents" -> D:\Users\Public\PubDocs
----------"Public\Music" -> D:\Users\Public\Media\PubMusic
----------"Public\Pictures" -> D:\Users\Public\Media\PubPics
----------"Public\Videos" -> D:\Users\Public\Media\PubVids
----- Move/Rename New User folders to fixed locations on D: by changing values for Default User
----------"UserProfile\Downloads" -> D:\Downloads
----------"UserProfile\Desktop" -> D:\Desk
----------"UserProfile\Favorites" -> D:\Favs
----------"UserProfile\Documents" -> D:\Docs
----------"UserProfile\Music" -> D:\Media\Music
----------"UserProfile\Pictures" -> D:\Media\Pics
----------"UserProfile\Videos" -> D:\Media\Vids
----- Rename Current User "Computer" -> "MyComp"
----- Rename Current User "Favorites" -> "Favs"
----- Rename Current User "Recycle Bin" -> "Trash"
----- Move/Rename the following Current User folders:
----------"UserProfile\Downloads" -> D:\Downloads
----------"UserProfile\Desktop" -> D:\Desk
----------"UserProfile\Favorites" -> D:\Favs
----------"UserProfile\Documents" -> D:\Docs
----------"UserProfile\Music" -> D:\Media\Music
----------"UserProfile\Pictures" -> D:\Media\Pics
----------"UserProfile\Videos" -> D:\Media\Vids
----- Remove Current User Favorites from Windows Explorer window
----- Remove Current User Libraries from Windows Explorer window
----- Delete no longer used User Profile folders

This is obviously set up for my own personal preferences, your's are probably different. Use these files as a model and edit BOTH files as you see fit with your own preferences. All the usual warnings about editing the registry, backup your registry and data, etc. apply.

Running the Command file will call the Reg file automatically. This should be run during the account setup stage or immediately after initial install for best results, but it can be run later. This has only been tested with Windows 7 Ultimate x86.

I would really appreciate it if anyone could give me some feedback on this and let me know of anything I did wrong or ways to improve this.

Link - Profiles.7z
Size - 15,043 (Only that big because it has NO compression to meet minimum file size requirement where it was originally uploaded.)
MD5: c72710b335d4b27fca2c91c96fabe039

Cheers and Regards

Posted: Tue Jul 13, 2010 3:46 pm
by MrNxDmX
This could help me a bit in future. I like to use my desktop folder in d partition of hdd. Also i everytime move my library folders (music, pictures, etc.)
Thanks for sharing :)

Posted: Sun Sep 12, 2010 3:41 pm
by roirraWedorehT
Thank you very much! This looks very helpful.

Posted: Fri Mar 04, 2011 11:48 am
by vmanda
@bphlpt: Just readed yours post. I thing that your script will be even more usefull if users can choose itself folders structure.
This can be done if you will switch all script to command script only. Reasons to modify your script to command script only:
1. REG_EXPAND_SZ registry keys will appear as clear txt, so peoples can modify your script by preferences.
For example:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"{3D644C9B-1FB8-4f30-9B45-F670235F79C0}"=hex(2):44,00,3a,00,5c,00,55,00,73,00,\
65,00,72,00,73,00,5c,00,50,00,75,00,62,00,6c,00,69,00,63,00,5c,00,50,00,75,\
00,62,00,44,00,6f,00,77,00,6e,00,00,00
became
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /f /v "{3D644C9B-1FB8-4f30-9B45-F670235F79C0}" /t REG_EXPAND_SZ /d "D:\Users\Public\PubDown"
so, if you add folders paths strings at top of script by using SET commands this will make script easy to be edited by users itself.

2. The script will be a single file.

This command line tool, reg2cmd, let you convert registry files to cmd script.
Usage:

Code: Select all

 reg2cmd profiles.reg profiles_1.cmd
Speaking of users preferences, for example, i wish a folder structure more likely old "Documents and Settings" from XP,
inplace of "Users" from Vista/Seven.

Anyway, many thanks for finding the way to change this settings.

Posted: Sat Mar 05, 2011 4:12 am
by bphlpt
Thanks for the tips, vmanda! This was one of my early projects, and it shows. I'll have to get around to reworking this one of these days. I'm just glad it's still finding people who use it. You are a master at making builders, so your advice is welcomed. Very nice to hear from you again, my friend.

Cheers and Regards

Posted: Tue Mar 15, 2011 4:00 am
by roirraWedorehT
Great news! I had given up customizing your script for my own use until now; thanks very much to both of you.