Product and service reviews are conducted independently by our editorial team, but we sometimes make money when you click on links. Learn more.

How To Create And Edit The Windows 8.1 .Reg File

How To Create And Edit The Windows 8.1 .Reg File

The Windows Registry stores your configuration settings and options in Windows 8.1. In this how-to we'll go through some handy tips and techniques for creating and editing Windows 8.1 .reg files.

Today, we'll go over examples of .reg files for Windows 8.1 with the goal that you will learn how to create your own .reg files from scratch.

MORE: How To Create And Edit The Windows 10 Registry File
MORE: Windows 10 How Tos

1. Windows 8.1 Homepage Hijack Fix

Problem: Malware has hijacked your Internet Explorer's homepage. 
Solution: Copy these settings into a text file, and then save with a .reg extension, for example: FixHijack.reg. Right-click the file and 'Merge' into your registry.

Calling the Registry EditorCalling the Registry Editor

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain]
"Start Page"=""

"Secondary Start Pages"=

; Created by Guy Thomas. Purpose to fix homepage Hi-jack

Instead of resetting to a blank page, you could prescribe a real URL, for example:
"Start Page"="" 

Note: The Secondary Start Pages entry may not be necessary in this .reg file example.

How did I make this .reg file with Regedit Export?Fixing the Windows 8.1 HomepageFixing the Windows 8.1 Homepage

This is how I found the homepage reference in the registry. On a machine that was working properly, I set the homepage to an unique website, a name like that is unlikely to be found anywhere else in the registry.

Next, I used regedit's 'Find' to locate the unique website name Then I exported this branch of the registry (File Menu, Export).

Note: This technique could be used to find other browsers' settings, e.g. Chrome homepage.

2. Windows 8.1 .Reg File Example: Roaming Profile Cache

Permitting roaming profiles provides a familiar desktop for users who hot-desk, or share systems with multiple users. However, a roaming profile can result in a slow logon or confusion. The killer reason to delete roaming profiles is where you have a 'Kiosk' machine used by people on a one-off basis. What can happen is that the disk fills up with roaming profiles that will never be used again.

Logic Behind Deleting Roaming Profiles

The first question for deleting roaming profiles is: 'Where does the cache get deleted? On the server or the Windows 8.1 computer?' The answer is on the machine where you set the value, DeleteRoamingCache=1.

Let us spend a minute checking the logic. In this instance, a value of 1 means: no roaming caches get saved. To be clear, 1 means that all roaming profiles get deleted on that Windows 8.1 computer.

On the other hand, changing to DeleteRoamingCache=0, would be a double negative, (don't delete), therefore you would end up with roaming profiles.

3. Windows 8.1 .Reg File Example: Deleting a Roaming Cache

In Windows 8.1, copy the text below, then open Notepad and paste the text. Now, save the file with .reg extension. To inject the settings into your registry just double-click the resulting file.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]


; Created by Guy Thomas. Purpose to delete the roaming cache

Note: As this registry setting is in the HKEY_LOCAL_MACHINE hive, it affects the caches of all users.

How to Research DeleteRoamingCache with Gpedit

The key piece of knowledge is realizing that DeleteRoamingCache can be controlled via Windows 8.1's Group Policy. You have a choice of editors, GPMC on a domain controller, or what I used was gpedit.msc (remember that .msc). Here is where you find the policy setting:

Computer Configuration: Administrative TemplatesSystemUser Profiles
And the policy: 'Delete cached copies of roaming profiles', (see screenshot below).

  Researching DeleteRoamingCache with Gpedit Researching DeleteRoamingCache with Gpedit

Note: This is a policy under Computer Configuration, (and not User Configuration).

The next connection is how to translate a policy setting into a .reg file? There is the cheat technique; if you know the value then you can simply 'Find' DeleteRoamingCache in the registry. However, let us assume we don't know the registry value and decide to research the values from scratch using my before-and-after technique.

  1. Export the registry with the group policy set to 'Not Configured' (see above). Save as Before.reg
  2. Change the Group Policy to 'Enabled'
  3. Export the registry AGAIN, save as After.reg
  4. Employ PowerShell's compare-object to isolate the difference. Alternatively call for WinDiff to highlight the differences.

Optionally, you could export only the HKEY_LOCAL_MACHINE branch of the registry. If you guess right, and the setting is in this hive, it will speed up your search. If you guess wrong then you waste time in drawing a blank and having to revert to exporting the whole registry.

Find Regedit Under Apps AlsoFind Regedit Under Apps Also

Instructions to Delete the Roaming Cache

Actually, you don't have to employ a .reg file at all; you could just edit the registry directly.

  1. Launch Regedit.
  2. Navigate to this path:
    HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon
  3. If necessary, create a new DWORD called DeleteRoamingCache

A hex value of 00000001 deletes all local roaming profiles.

4. Windows 8.1 .Reg File Example: Removing Shortcut Arrow & Copy To

If you don't like arrows on your desktop shortcuts, then this registry tweak is for you. Beware; while this registry tweak is not difficult to achieve you do need to absorb the principles.

The crucial point is that you need a special clear icon file; you can download the noArrow.ico zip file from Guy Thomas's website. Once you have the file then it's just a matter of 'wiring-up' the key in the registry called 'Shell Icons' to the location where you saved the noarrow.ico file.

Regedit Shortcut with ArrowRegedit Shortcut with Arrow

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerShell Icons]

; Created by Guy Thomas. Windows 8.1 Remove Shortcut Arrows.

Detailed Instructions

  1. Execute notepad.exe
  2. Copy the text from the above box.
  3. Paste in to Notepad.
  4. Save as RemoveShortcut, and remember the .reg file extension.
  5. Right-click RemoveShortcut.reg, select 'Merge' from the short-cut menu.
  6. Log off and when you log on again check the desktop shortcuts; the .reg file should have removed the arrows.

Note: If you see instead of a shortcut arrow a phantom white element, it means there is likely something wrong with the path statement in the .reg file.                 

5. Windows 8.1 .Reg File Example: 'Copy To' Context Menu 

                                                              'Copy To' Context Menu'Copy To' Context Menu

I have always found copying a file from one folder to another cumbersome. Sometimes Windows File Explorer develops a mind of its own and drops the file in the wrong place. Moving a file can be worse, the file seems to disappear altogether. 

In order to solve this problem I have an option on the context menu to 'Copy To folder...', or 'Move To folder...' The way I achieve this goal is to merge the .reg file below with the registry. Then when I right-click the file and select 'Copy to Folder', a dialog box opens inviting me to choose the file destination. The result is copying or moving files is now fool-proof.

Here are the contents of the actual Copy To .reg file:

Windows Registry Editor Version 5.00

@="{C2FBB630-2971-11d1-A18C-00C04FD75D13} "

; Created by Guy Thomas. Windows 8.1 "Copy to" shortcut.

Once you copy the above instructions into Notepad, and save with a .reg extension; you are ready to right-click the new .reg file and 'Merge' into the registry.

There is no need to log off as, this tweak works straightaway. Launch Windows Explorer, right-click any file and observe the 'Copy To folder' context menu option.

How to Add the 'Copy To' to the Explorer Context Menu

  1. Launch Regedit - 'Run As Administrator'.
  2. Drill down through HKEY_CLASSES_ROOT, and navigate to this key: HKEY_CLASSES_ROOTAllFilesystemObjectsshellexContextMenuHandlers
  3. Add the 'Copy To' to the Explorer Context Menu
  4. Create a new Key. The name is traditionally Copy To, but I used CopyTo - you can use any name you prefer. 
  5. In the right-hand pane, you should see an existing REG_SZ called Default. It is this default item that you need to re-program to be:
  6. Close regedit. This tweak works without having to log off. Launch Windows Explorer, right click any file and see 'Copy To folder' as a context menu option.

Note: the {curly brackets} are required for this CLSID.

Even though I called the key 'CopyTo', Windows Explorer labels it Copy to Folder.

You may also notice that MoveTo in the above screenshot appears in my context menu. To achieve this goal I changed one digit in the CLSID, C2FBB630 to C2FBB631 and then copied the curly brackets and contents to the default in MoveTo.

The full name of the MoveTo value is:

Creating the Windows 8.1 .Reg File

One more crucial learning point: export the registry, and save the file with a .reg extension. I hope that you will see how to create your own .reg files by researching the registry settings. My favorite technique is the "before-and-after" one using regedit or gpedit.