Win 7 Profile Manipulation

Windows 7 Update Pack discussion.
Post Reply
User avatar
bphlpt
Posts: 1367
Joined: Sat Apr 19, 2008 1:11 am

Win 7 Profile Manipulation

Post by bphlpt » Mon Jul 12, 2010 11:08 pm

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
Last edited by bphlpt on Wed Jan 28, 2015 1:02 am, edited 2 times in total.

User avatar
MrNxDmX
Moderator
Posts: 3112
Joined: Mon Jan 03, 2005 7:33 am

Post by MrNxDmX » Tue Jul 13, 2010 3:46 pm

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 :)

User avatar
roirraW "edor"
Posts: 761
Joined: Sun Oct 15, 2006 2:25 pm

Post by roirraW "edor" » Sun Sep 12, 2010 3:41 pm

Thank you very much! This looks very helpful.
Gigabyte case GZ-FA2CA-AJB
Gigabyte MA790X-UD4P with Realtek High Definition Audio
HIS Radeon HD 4850 512MB
AMD Athlon 64 X2 4400+ 2.3GHz
Corsair 4GB DDR2-6400 4-4-4-12
4x1TB SATA RAID 0+1/2x640GB SATA RAID 0/Misc. PATA
Windows 7 x64

User avatar
vmanda
Posts: 1634
Joined: Wed Apr 18, 2007 12:25 pm
Location: TM.Romania

Post by vmanda » Fri Mar 04, 2011 11:48 am

@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.

User avatar
bphlpt
Posts: 1367
Joined: Sat Apr 19, 2008 1:11 am

Post by bphlpt » Sat Mar 05, 2011 4:12 am

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

User avatar
roirraW "edor"
Posts: 761
Joined: Sun Oct 15, 2006 2:25 pm

Post by roirraW "edor" » Tue Mar 15, 2011 4:00 am

Great news! I had given up customizing your script for my own use until now; thanks very much to both of you.
Gigabyte case GZ-FA2CA-AJB
Gigabyte MA790X-UD4P with Realtek High Definition Audio
HIS Radeon HD 4850 512MB
AMD Athlon 64 X2 4400+ 2.3GHz
Corsair 4GB DDR2-6400 4-4-4-12
4x1TB SATA RAID 0+1/2x640GB SATA RAID 0/Misc. PATA
Windows 7 x64

Post Reply