All about regedit

Googled

Vista Registry – How to Create .Reg Files
Vista Registry – How to Create .Reg Files

This page explains how to create a .reg file. The idea is that you can double-click a .reg file and thus merge its values with those in your Vista registry. One advantage of a .reg file is that it is easy to apply; you don’t need to drill down through endless keys, as you would with regedit. Another advantage is because it’s a text file you can open with Notepad and then edit the values easily. An additional benefit is that .reg files provide their own built-in documentation for changes that you make to the registry.
Purpose of .Reg Files
How to Create .Reg Files with Registry Export
Open the .Reg File with Notepad
Dissecting the .Reg Files
How to Create a .Reg File with Notepad
Summary – Creating .reg files


Purpose of .Reg Files

The main purpose of .Reg files is to modify the operating system’s behaviour by changing values in your registry. Perhaps you have seen such .reg files as part of a program’s installation package? It is deceptively easy to merge a .reg file with your registry, you simply double-click a text file with .reg extension. An alternative method is to introduce the values held in the .reg file by using regedit’s import facility. Where you need to automate a registry change, you could script the command: regedit /s path to .reg file.

Whilst it is easy to import the contents of a .reg file into the registry, do make sure you know what you are doing. Remember that unlike clicking in a GUI, there are no internal checks on the consequences of changing the registry values. I leave creating and testing the content of the .reg files to other dedicated pages, on this page I want to concentrate on the general techniques for creating a .reg file.
Getting Started with .reg files

The easiest way to begin is by launching regedit, then select the value you are investigating and exporting that branch of the registry. Naturally, allow regedit to save the file with a .reg extension.

Once you have created the experimental file, examine it in Notepad. Right-click the file and then select: ‘Open with’. If necessary make changes to the values and then import the .reg file into the registry. When you have perfected the .reg, you can import its settings to different machines.
How to Create .Reg Files with Registry Export
Launch Regedit. Click on the Vista Start Button, type ‘Regedit’ in the ‘Start Search’ dialog box.
Navigate to the area of the registry that you are interested in, for example:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
File Menu – Export. From inside Regedit, click on the File menu, select Export and choose ‘Selected Branch’. Note the .reg file extension.
Remember the path. The default path will be ‘Documents’, however you may wish to save the .reg files into a dedicated folder, for example c:\ reg.
Open the .Reg File With Notepad

Beware, if you double click a .reg file the default behaviour is for Vista to try and add the contents to your registry. The best procedure for reading the .reg file is to right-click and then select ‘Edit’, or ‘Open with’, from the shortcut menu; what that does is open the xyz.reg file in notepad.

Example .reg file from the Winlogon registry folder.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“ReportBootOk”=”1”
“Shell”=”explorer.exe”
“Userinit”=”C:\\Windows\\system32\\userinit.exe,”
“VmApplet”=”rundll32 shell32,Control_RunDLL \”sysdm.cpl\””
“AutoRestartShell”=dword:00000001
“LegalNoticeCaption”=””
“LegalNoticeText”=””
“PowerdownAfterShutdown”=”0”
“ShutdownWithoutLogon”=”0”
“cachedlogonscount”=”10”
“forceunlocklogon”=dword:00000000
“passwordexpirywarning”=dword:0000000e
“Background”=”0 0 0”
“DebugServerCommand”=”no”
“WinStationsDisabled”=”0”
“DisableCAD”=dword:00000000
“scremoveoption”=”0”
“ShutdownFlags”=dword:00000027
“AutoAdminLogon”=”1”
“DefaultUserName”=”Guyt”
“DefaultPassword”=”P££sw0rd”
“DefaultDomainName”=”cp”
“Welcome”=”Guy’s World”

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions]

°
Dissecting the .Reg Files

Registry Editor

Quite reasonably, the, very first line of your .reg file contains the name of the Registry editor. For Vista, XP and Windows Server 2003, the correct name is: ‘Windows Registry Editor Version 5.00’. Older registries such as Windows 95 and NT 4.0 use ‘REGEDIT4’. Later registries are backwardly compatible, thus Vista understands ‘REGEDIT4’. Incidentally, even though Vista’s regedit reports to be version 6.0 in its Help / ‘About’ menu, the .reg files that it creates report to be from Version 5.00, strange but true.
Windows Registry Editor Version 5.00

; Created by Guy Thomas
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“Values”=”settings”

Blank Lines

You need a blank line between each set of .reg paths. There is also a blank line between the Registry Editor Version, and the first path. There is no need for a blank line between individual entries for the same path. (See first example in the blue table above.)

; Comments

If you create your own .reg file, then it is possible to place judicious comments by preceding that line with a semi-colon.
Windows Registry Editor Version 5.00

; Created by Guy Thomas. Purpose to display the Build Number on the desktop
[HKEY_CURRENT_USER\Control Panel\Desktop]
“PaintDesktopVersion”=dword:00000001

; Created by Guy Thomas. Purpose to display the Build Number on the desktop.

The Body of a .reg File

The registry is huge. Consequently, one of the first lines in the .reg file is the path to the values you wish to merge. Observe the [square brackets] which enclose the path, for example:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

One .reg file can contain multiple paths. For simplicity, I have truncated the exported .reg file (above) and not shown the second and third paths. If you try this export experiment you will see zillions of Group Policy settings underneath:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions]

A plain entry in the .reg file means a REG_SZ type of value, for example: “Shell”=”explorer.exe”. With hexadecimal entries, note the word dword to the right of the equals sign, for example: “passwordexpirywarning”=dword:0000000e. Incidentally, 0000000e in hex is 14 in decimal.

REG_DWORDS take only hexadecimal numbers, whereas REG_SZ are more flexible and take text or decimal numbers.

Deleting Registry Entries

The secret of deleting registry entries is to master the minus [-] sign. Earlier, I mentioned the phrase, ‘add keys and values’, strictly speaking, I should have used the word merge instead of add. The default behaviour is to keep all existing registry entries, and append the values in the .reg file. However, if the new value creates a conflict, the .reg setting wins.

If you want to delete an existing entry, then you need to master the minus sign. Here is an example,
to recap, we set DefaultPassword with:
“DefaultPassword”=”P££sw0rd”

To delete the value called DefaultPassword append equals and then minus, like this:
“DefaultPassword”=-

Note if you erroneously enclosed the minus sign in speech marks (“-“), then you would be setting the default password as equal to minus – probably not what you intended.
“DefaultPassword”=- (Correct)
“DefaultPassword”=”-” (Wrong)

Registry Types

By far the most common registry types are REG_SZ (String Value) and REG_DWORD (dword). However, to see the full list, call for regedit and right-click in the right pane, select New, and now you should see a list of all the possible registry types, see the screen shot to the right.

Key – Means, give me a new folder, or a new container object.
String Value – Text or numbers.
Binary Value (REG_RESOURCE_LIST) – Machine readable 1 and 0 used by drivers.
DWORD (32-bit) Value – Hexadecimal value (not decimals).
QWORD (64-bit) Value – Hexadecimal, capable of even bigger numbers.
Multi-String (REG_EXPAND_SZ). String values separated by commas or spaces.
Expandable String Value – Expandable in the sense that they can contain variables which are resolved when a program calls for this data.
How to Create a .Reg File with Notepad

When you need to create your own .reg file, it is probably easiest to start with an existing file and modify its settings. One way to obtain such a file would be to export a branch of the registry using regedit. While it is easy to build your own .reg file, here is a reminder of a few simple syntax rules.

At the top, the file needs the name of the registry editor, for example:
Windows Registry Editor Version 5.00

Next comes a blank line. Then follows the path enclosed in [square brackets]

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

Once we have defined the folder in the registry that we wish to amend, then we can specify the values, for example:

“DefaultUserName”=”Guyt”
“DefaultPassword”=”P££sw0rd”
“DefaultDomainName”=”cp”

Here is the completed .reg file as seen in notepad. As you save, remember the .reg file extension, for example Auto.reg.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
“DefaultUserName”=”Guyt”
“DefaultPassword”=”P££sw0rd”
“DefaultDomainName”=”cp”

Observe the rhythm of the REG_SZ syntax, “ValueName” = “string”. Obey the rules of the quotes, “Matching open and closing” speech marks. In the case of hex numbers, known as REG_DWORD, precede the final value with dword: and don’t use speech marks for the right side of the equals sign, for example:

“ShutdownFlags”=dword:00000027 (Correct)
“ShutdownFlags”=”dword:00000027” (“Wrong”)
@ At symbol

As you get more experienced with .reg examples, you may discover the @. Since the @ is found on the first line of the code proper, this is a clue that it means the default setting. Thus rather than saying
Default=”xmlfile”
The .reg file uses: @=”xmlfile”
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.xml]
@=”xmlfile”
“Content Type”=”text/xml”
“PerceivedType”=”text”

[HKEY_CLASSES_ROOT\.xml\PersistentHandler]
@=”{7E9D8D44-6926-426F-AA2B-217A819A5CCE}”

6 thoughts on “All about regedit

  1. To disable auto runs completely, users will need to copy the text below into Notepad. It should be one line from the left bracket to the final quotation mark.
    REGEDIT4
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\IniFileMapping\Autorun.inf]@=”@SYS:DoesNotExist”
    Save it as something memorable, such as StopAutoRun.REG. Double-click on the saved file, and you close the AutoRun loophole.

  2. some good Xp Tricks
    shtcut to restarting xp..

    You can restart a Windows XP Pro and Home machine easily by creating a shortcut with following path. (Assume you installed Windows XP on your C: Partition) “c:\windows\system32\shutdown.exe -r -f -t 00” -r is for restarting the computer. -f is to force close all programs without saving. -t 00 is used to restart in zero seconds. i.e. as soon as you D.Click on the shortcut. You can log off from a Windows XP Professional or Home edition by running “C:\windows\system32\shutdown.exe -l -f -t 00”. Also you can shutdown a Windows XP Home or Professional edition by running “c:\windows\system32\shutdown.exe -s -f -t 00”. You always have to turn from the CPU after running this command. (Same with AT and ATX powered machines.) If you want to turn down power of ATX machine automatically, run “c:\windows\system32\tsshutdn.exe 00 /POWERDOWN /DELAY:00” This is used to turn off a server. Even though your computer will be
    shutdown completely, this whole operation will take 30 seconds to finish. Even though you don’t have networked computers attached to your computer, this works.

    1) Disabling Display of Drives in My Computer :

    This is yet another trick you can play on your geek friend. To disable the display of local or networked drives when you click My Computer go to : HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer Now in the right pane create a new DWORD item and name it NoDrives. Now modify it’s value and set it to 3FFFFFF (Hexadecimal) Now press F5 to refresh. When you click on My Computer, no drives will be shown. To enable display of drives in My Computer, simply delete this DWORD item. It’s .reg file is as follows: REGEDIT4 [HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explore r] “NoDrives”=dword:03ffffff

    2) Pop a banner each time Windows Boots :

    To pop a banner which can contain any message you want to display just before a user is going to log on, go to the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\WinLogon Now create a new string Value in the right pane named LegalNoticeCaption and enter the value that you want to see in the Menu Bar. Now create yet another new string value and name it: LegalNoticeText. Modify it and insert the message you want to display each time Windows boots. This can be effectively used to display the company’s private policy each time the user logs on to his NT box. It’s .reg file would be: REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Winlogon] “LegalNoticeCaption”=”Caption here.”

    3) Great trick Lock ur PC yourself

    lock ur pc.. open notepad copy and paste the script below and save it .VBS extention
    This wil create a shortcut.. run(click) it

    set WshShell = WScript.CreateObject(“WScript.Shell”)
    set oShellLink = WshShell.CreateShortcut(wshShell.SpecialFolders(“D esktop”) & “\LockWorkstation.lnk”)
    oShellLink.TargetPath = “%windir%\system32\rundll32.exe”
    oShellLink.Arguments = “user32.dll,LockWorkStation”
    oShellLink.Save

    first select a folder for example i’ll use a folder name movies in D drive D:\movies\

    in the same drive u create a text file and type

    ren movies movies.{21EC2020-3AEA-1069-A2DD-08002B30309D}

    and save it as loc.bat

    again u type in a notepad as

    ren movies.{21EC2020-3AEA-1069-A2DD-08002B30309D} movies

    and save it as key.bat

    now in D drive u can see two batch files loc and key.. when u double click loc the movie folder will change to control panel and whn u double click key the control panel will change to normal folder..

    there are two more different tricks in dis site to lock ur pc down in a unique ways.. donno where i have typed it.. !!!

    4) Deleting System Options from the Start menu :

    You can actually remove the Find and Run options from the start menu by performing a simple registry hack. Again like always Launch the registry editor and scroll down to the below key: HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer Right-click on the right pane and select New, DWORD Value. Name it NoFind.(To remove the RUN option name it NoRun). Double-click the newly create DWORD to edit it’s value and enter 1 as its value. This will disable the FIND option of the Start Menu and will also disable the default Shortcut key(F3 for Find.) To restore the Run or find command modify the value of the DWORD to 0 or simply Delete the DWORD value.

    5) Cleaning Recent Docs Menu and the RUN MRU :

    The Recent Docs menu can be easily disabled by editing the Registry. To do this go to the following Key: HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer Now in the right pane, create a new DWORD value by the name: NoRecentDocsMenu and set it’s value to 1. Restart Explorer to save the changes. You can also clear the RUN MRU history. All the listings are stored in the key: HKEY_USERS\.Default\Software\Microsoft\Windows\Cur rentVersion\Explorer\RunMR U You can delete individual listings or the entire listing. To delete History of Find listings go to: HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Doc Find Spec MRU and delete

    6) Can u Delete Recycle Bin?

    1 thing is 4 sure, delete option can be added 2 recycle bin…
    the old registry thing will work out…..
    * launch d registry…
    * open HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\ShellFolder
    * to add a rename and delete option, change the Dword attribute to 70 01 00 20
    * refresh and reboot the system….. u r done.

    PS: always backup ur data as well as registry b4 attempting 2 work on it if u r a newbie….

    7) To change the icons used for specific drives in explorer

    Open regedit by typing regedit into start->run

    then navigate to

    HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer

    now create a key(KEY not VALUE!!) called DriveIcons under Explorer…
    now within DriveIcons, create another key with the drive letter you want to change (e.g.,HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Window s\CurrentVersion\Explorer\DriveIcons\K)…
    create another key within the drive letter key called DefaultIcon…
    now set the default String value equal to the icon you want to use. if you have a file that has more than one icon in it, such as a DLL file, use the standard
    C:\full_path\icon_file.dll,n ) where n is the number of the icon within the file icon_file.dll…

    ~ c h e e r s! ~

    More

    change drive icons…..

    first of all copy a icon file to the root of the drive.
    example: c:\icon.ico

    then create a file called: autorun.inf in c:\autorun.inf
    then open that file and type the following:

    [autorun]
    icon=icon.ico

    save and close the file.

    now open my computer and resfresh.. and woh! icon changed….
    you can apply to other drives too.

    be carefull:

    “autorun.inf” and “ico.ico” must be in the root of the drive.
    example: c:\autorun.inf and c:\icon.ico.
    same on the root.

    ENJOY, this works on 98 too!!!!!!!!!!!!!!!!!!

    http://www.onlinewebmarket.net/microsoft-windows/6145-some-good-xp-tricks.html

  3. If anyone happens to be experiencing Internet Explorer 8 launching extremely slowly,and have tried just about everything to solve the problem with no luck,try this registry fix.

    First backup the registry using ERUNT.
    Registry Backup and Restore for Windows NT/2000/2003/XP/Vista.

    Copy and paste ALL the following text in the code box below into Notepad.
    Click on Start/All Programs/Accessories/Notepad.
    Click on File(in the menu at the top)>Save as../Save as Type: ‘All Files’ /File name: fix.reg to your desktop.
    Then double click on the fix.reg file on your desktopand agree to merge the information into the registry,then restart your pc.

    REGEDIT4
    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]
    [-HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]
    [-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges]
    [-HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges]
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains]
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges]
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges]

    source : http://tweaks.com/forum/Topic250766-3-1.aspx

  4. Increase Internet Speed
    first copy the below on a note pad n save it as tweak.reg
    REGEDIT4
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
    “TcpWindowSize”=dword:faf0
    “Tcp1323Opts”=dword:0
    next right click on that saved file n click on merge u will get an option OK clicl on that

    next copy the below in other note pad n save it as undo.inf
    [Version]
    signature=$CHICAGO$

    [DefaultInstall]
    DelReg=Delete_Reg_Entries

    [Delete_Reg_Entries]
    HKLM,System\CurrentControlSet\Services\Tcpip\Parameters,TcpWindowSize
    HKLM,System\CurrentControlSet\Services\Tcpip\Parameters,Tcp1323Opts
    then right click on the saved note pad(undo.inf) n select install
    then restart ur system

    source : http://arun-pcknowhow.blogspot.com/2009/05/increase-internet-speed.html

  5. Manually remove stubborn programs from Microsoft Windows

    These steps will help you manually remove program icon from the add/remove programs tool in Microsoft Windows that reviews to go away after uninstalling that particular software. Just make sure that you back up the registry (While in regedit >File > backup) just incase you change the wrong key entry.
    Click Start, click Run, type regedit in the Open box, and then press ENTER.
    Locate and click the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
    After you click the Uninstall registry key, click Export Registry File on the Registry menu.
    In the Export Registry File dialog box, click Desktop in the Save in box, type uninstall in the File name box, and then click Save.
    Each key under Uninstall represents a program that appears in Add/Remove Programs. To determine which program that each key represents, click the key, and then view the following values:
    DisplayName – the value data for the DisplayName key is the name that is listed in Add/Remove Programs

    -and-

    UninstallString – the value data for the UninstallString key is the program that is used to uninstall the program
    After you identify the registry key that represents the program that is still in Add/Remove Programs, right-click the key, and then click Delete.
    After you delete the key, click Start, point to Settings, and then click Control Panel.
    In Control Panel, double-click Add/Remove Programs.
    In Add/Remove Programs, verify that the program for which you deleted the registry key is not listed.
    If the program list is not correct in Add/Remove Programs, you can double-click the Uninstall.reg file on your desktop to restore the original list of programs in the registry.
    If the program list is correct in Add/Remove Programs, you can right-click the Uninstall.reg file on your desktop, and then click Delete.

    This works pretty much with all versions of windows from Windows 98 on. Hope this helps.

    source : http://cybercomputerstore.com/2009/05/manually-remove-stubborn-programs-from-microsoft-windows/

  6. set proxy in IE settings by .reg file
    Windows Registry Editor Version 5.00

    ;—————————————————————— proxy.reg
    ; set 192.168.1.1:80 as proxy for IE
    ;—————————————————————————-

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
    “MigrateProxy”=dword:00000001
    “ProxyEnable”=dword:00000001
    “ProxyServer”=”192.168.1.1:80”
    “ProxyOverride”=””

Leave a comment