Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Windows 7 Windows 7
Search Search
Search for:
Tech Support Guy > > >

Making a .reg file


(!)

mightymo77's Avatar
mightymo77 mightymo77 is offline
Computer Specs
Member with 42 posts.
THREAD STARTER
 
Join Date: Jun 2007
Experience: Advanced
11-Nov-2009, 09:11 PM #1
Making a .reg file
How do you create a reg file to edit the registry to do the following:

Quote:
Change Default Folder View
Open the Registry Editor (regedit) and go to:
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]

Left-click on the Shell key and in the right pane, if you can see BagMRU Size then there is no need to undertake this step. If it isn't there however, right-click and select New>DWORD 32-bit Value and name it BagMRU Size. Set this value to 10000 in Decimal (or 2710 in Hexadecimal).

Now go to the following keys:

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]

Right-click on the Bags key in the left pane and select Delete, then do the same thing for BagMRU. This will remove most existing customizations for things like window sizes, positions and views. While still in the same place in the Registry Editor, you will need to manually recreate one of these keys with a new setting. Right-click on the following key in the left pane:

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]

Create a new key called Bags to replace the one you just deleted. Right-click on Bags, select New>Key and name this new key AllFolders. Right-click on AllFolders, select New>Key and name this new key Shell. The end result should look like this:

[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\ Windows\Shell\Bags\AllFolders\Shell]

Now left-click on the last Shell key and in the right pane right-click in an empty area and select New>String Value. Name this new string FolderType and once created, double-click on it and in the Value Data box you can set the default view which all folders will initially take (unless otherwise specified) by entering one of the following values:

NotSpecified, Contacts, Documents, Music, Pictures

For example if you enter Documents in the FolderType Value Data box (which I recommend), then all folders for which you do not manually set a view will default to the standard Documents folder view as you set it.

Now in Windows Explorer go to your \Users\[username]\ directory and for each of the main folder types under there (Documents, Pictures, Music, Videos), make sure that you set the view you wish, including things like choosing which columns to show and how wide they each are, the size of any icons/thumbnails, the way in which they are sorted, etc. As you make the changes, for each folder click the Organize button at the top of Windows Explorer, select 'Folder and Search Options', go to the View tab and click the 'Apply to Folders' button. This will set this view for all folders of that same type, and this method also means that should you copy files of any other type into a folder, it will not alter that folder's view settings - from now on the settings should remain exactly as you leave them.
It's kind of a pain to do that manually after a clean format, would love to have a reg file to do it for me.
pjhutch's Avatar
pjhutch pjhutch is offline
Senior Member with 429 posts.
 
Join Date: Aug 2005
Experience: Advanced
12-Nov-2009, 12:10 PM #2
You can create a batch file with a series of REG.EXE commands to add, delete or modify registry keys. E.g.

REG ADD HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell /v BagMRU /t DWORD /d 10000
add a new DWORD called BagMRU and sets it to 10000.

REG DELETE HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags

Delete the Bags Key and sub-entries.

Last edited by pjhutch; 12-Nov-2009 at 12:10 PM.. Reason: remove extra slash
Squashman's Avatar
Trusted Advisor with 19,643 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
12-Nov-2009, 01:56 PM #3
Batch or once you have done it manually, just export the registry keys to back them up. Then if you ever clean install again, just merge them back in.
TheOutcaste's Avatar
Computer Specs
Member with 9,028 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
12-Nov-2009, 10:26 PM #4
I agree with Squashman, export the keys right after doing the configuration, then create a single file to do all the work on a new install, or to reset the current settings to your default.

Deleting the Bags and BagsMRU keys deletes all the customizations. I believe that the "Bags" that store the info are created in the order that folders are opened. If you export the current settings, they may include settings for folders that won't exist on a new install. I'm not sure what effect that would have.

You should be able to delete the keys, then customize one of each folder type, using folders that exist on a new install. Then export the Bags and BagsMRU keys, remove the Windows Registry Editor Version 5.00 line from the start of each file (it should only appear once, at the start of the file), then paste the content into the the reg file shown below, replacing the lines in red.
This adds/sets the FolderTypes value, and deletes the Bags and BagsMRU keys. Then merges the settings you've pasted in. The BagsMRU Size value is added last, in case it's included in the exported keys you paste in.

So you would replace the Red lines with the contents for the appropriate file.

The minus sign is how you delete a key in a .reg file.
Code:
Windows Registry Editor Version 5.00

;Set size to 10,000 (2710 Hex)
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell]
"BagMRU Size"=DWORD:00002710

;Deletes these keys
[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]

[-HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU]

;paste the exported Bags file here
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags]

;paste the exported BagsMRU file here
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagsMRU]

;Sets default type for folders
[HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\ Windows\Shell\Bags\AllFolders\Shell]
"FolderType"="Documents"
The reg add/delete commands require data that contains spaces to be quoted, and should use the /F switch if you don't want to be prompted when deleting, or if the value already exists, so proper syntax would be:
Code:
REG ADD "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell" /V "BagMRU Size" /T DWORD /D 10000 /F
REG DELETE "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑