[Solution] .REG Registry Files Always Open with Notepad in Windows

Most of our tutorials include download of ready-made registry script files to fix a problem or to tweak Windows functionality. Registry scripts have .REG file extension and when you run them, Windows merges their data into Windows Registry.

By default, .REG files are associated with Registry Editor (regedit) and when you double-click on a .REG file, Registry Editor executes the file and shows a message box asking for your confirmation.

Sometimes when you try to run a .REG file, Windows opens it with Notepad and you can't merge its data with Registry. After receiving several emails about this common problem, today I decided to post a working solution to fix this annoying problem.


The automatic opening of .REG file in Notepad can be caused by several reasons like following:

  • You accidentally associated Notepad or another program with .REG file using "Open with" window
  • You used a 3rd party tweaking utility to change the behavior of opening .REG files
  • .REG files association settings got corrupted in Windows Registry

Actually many tweaking software come with an option to change .REG file behavior. These software allow you to set "Edit" or "Open with Notepad" option as default to open .REG files instead of merging them into Registry. This option is provided for security purposes so that you don't merge incorrect data in Windows Registry accidentally.

It might also be possible that you changed .REG file association settings using "Open with" dialog box. When you right-click on any file, you get "Open with" option to change the default program associated with that file type.

And sometimes .REG file association settings get corrupted in Windows Registry. It might happen because of using a Registry cleaner software or installing an incorrect registry script file.

Anyway there are many ways to fix this problem and to re-associate .REG files with registry Editor so that you can directly merge registry files into Windows Registry instead of opening them in Notepad.

Today in this tutorial, we are going to mention 4 easy ways to fix the problem when .REG files always open with Notepad instead of merging into Windows Registry.

Following are those 4 easy to use methods:

  • METHOD 1: Using .REG file context menu
  • METHOD 2: Using Registry Editor
  • METHOD 3: Using Command Prompt
  • METHOD 4: Using Open with window

METHOD 1: Using .REG File Context Menu

If a .REG file opens in Notepad in your system, don't double-click on it. Just right-click on the .REG file and select "Merge" option to directly merge them into Windows Registry.


Right-clicking on .REG file and selecting "Merge" option will do the same job as you double-click on a .REG file to merge it into registry.

METHOD 2: Using Registry Editor

If the above method doesn't work for you. You can merge the .REG file using Registry Editor itself.

1. Type regedit in RUN or start menu search box and press Enter. It'll open Registry Editor.

2. Now click on File menu and select Import command.


3. It'll open browse dialog box where you can select the .REG file and it'll merge the data into Windows Registry.

METHOD 3: Using Command Prompt

Both above mentioned methods are temporary fix for this problem. They help you in merging the .REG file data into Windows Registry but they don't re-associate .REG files with Registry Editor.

You can use this method to re-associate .REG files with Registry Editor:

1. Click on "Start button -> All Programs -> Accessories". Right-click on "Command Prompt" and select "Run As Administrator". If you are prompted to enter password, enter the password and continue. You can also open Command Prompt in Administrator mode by typing "cmd" in Start Menu Search box and press "Ctrl+Shift+Enter".

2. Now provide following command:



3. That's it. It'll restore .REG file settings and it should fix the problem.

METHOD 4: Using Open With Window

If none of the above mentioned methods work for you. Here is a 100% working method to fix this irritating problem.

1. Right-click on .REG file and select "Open with -> Choose default program" option.


2. It'll open "Open with" window. Now look for "Registry Editor" program in the given list. If you find it, select it.

3. If you don't find the program in the given list, click on "Browse" button, type %windir%\regedit.exe in file name text box and click on "Open" button. If you don't want to type the whole path, you can go to C:\Windows folder in browse dialog box and there you'll get regedit.exe file to select.


4. Now make sure to select the checkbox "Always use the selected program to open this kind of file" and click on OK button.

5. That's it. It'll re-associate Registry Editor with .REG files and now whenever you'll try to open a Registry script, it'll directly merge the data into Windows Registry instead of opening the file in Notepad.

Share this article: Facebook | Twitter | Google+ | Reddit | Tell a friend

Posted in: Troubleshooting, Windows 7, Windows Vista, Windows XP

Other similar articles that may interest you


  • Excellent article Vishal, thanks :)

  • I ever experienced this problem before and I used method 4. Works great.

  • Hi....! VG
    plzz provide me visual basic 2010 all code
    plzzz "VG"

  • Plzz VG Provide Me Visual Basic 2010 Codes

  • Hey VG,
    I got a strange problem with registry editor. Whenever i want to merge any *.reg file to windows registry, it says, 'Registry editor has been disabled by your administator.' . The same thing happens with Task manager.
    Please tell me a solution to get rid of this.

  • VG

    ^^ Check following:


  • I don't understand the description "folder view type problem" that is shown in the screenshots. Folder view type doesn't have anything to do with .reg file associations. Can you please explain?


  • VG

    ^^ Just to show how it looks like when REG file opens in Notepad instead of merging into Registry.

  • Ah, now I get it. Thanks.

  • Had issues with installing/uninstalling programs on my vista. Went through various sites and downloaded the msiserver.reg info. NOBODY bothered to mention what your article did about loading registry files. I used the registry import method #2. It loaded, I rebooted and smiling ever so much since the installer now works. THANK YOU!

  • VG

    ^^ Glad to help you. :)

  • Great
    Thank you very much

  • Thank u very much :d

  • This was really helpful
    Thanks..Thanks a lot

  • Usefull..

  • Hi..useful information!!..actually i am very new to this..i want to automate the Internet Explorer settings using batch file.i.e.
    Tools->Internet Options->Connections->LAN settings and i want to un-check all the check boxes except "Automatically detect settings". and save it..
    So if i am using below code and saving it in .REG extension and using MERGE then will my file be automated:
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

    Please help me out!!!!

  • VG

    ^^ Yes. It should work.

  • Hii..Actually the code that i have mentioned that is in .reg file extension.
    I wanted to change the "LAN settings" available in Connections tab.i.e.unchecking or checking the "Automatically detect settings" setting.
    And i wanted to code in .bat file extension.
    I coded something which looks like this:
    REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v Automatically detect settings /t REG_DWORD /d "1" /f

    But it didn't worked. Please if you could tell me, where i am going wrong.

  • VG

    Use following:

    REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d "1" /f

  • I've tried some problem.
    My file (extention .txt) always open with regedit.

    I will try to solve problem :
    1. - right click
    . - properties
    . - open with...
    . - choose default programs
    . - Select notepad
    X_X" Can't work

    2. @Anonymous "right click on the file go to properties and under general tab. click change. now browse for notepad in c:\windows. click select it as your default program to open .txt files. Hope that helps.."....
    .. But, What the hell ? there's no "change" in general tab !!, sorry i'ts not working

    3. I Use Default Programs Editor,
    - Click File Type Settings
    - Click Context Menu
    - Delete Command "Open with program regedit or registry"
    - Click Save Context Menu
    ...it's work, Thank's a lot... ^_^

  • once i click tha start button and right click the some program and open with notepad,now all programs are open with notepad how to solve

  • VG

    ^^ Try following:


  • Plzz help me....I used ccleaner to cleans the registry.....And then, after i restart my laptop i can't
    Open google chrome and can't updates my antivirus...other that, my laptop slowed down after doing the registry clean.(sorry for my english)


  • VG

    ^^ First post your HijackThis log file in following topic:


  • thanks,but the problem has solved few days ago^^.... :)

    But I get problem with my taskbar........when I minimize any icons or folder(what ever).....It is on the taskbar and hovering over it shows the preview of the window. However clicking on it does not make it reopen and become visible....How can i fix it..


  • Hello, I'm trying to install an Unturned save from a YouTube video, but when i download the save it says that it's a .txt file even though it the file name has .reg at the end. The thumbnail image is a text document, and none of the above 4 fixes work for me.

    Fix 1:
    Since it's entered as a text file, the 'Merge' option doesn't appear.

    Fix 2:
    Registry Editor's 'Import' function doesn't show the .reg file at all in the browse file window.

    Fix 3:
    After i copy and paste the command into it, it says that there was an error while processing .reg.

    Fix 4:
    It doesn't allow me to associate the '.txt' file with Registry Editor and won't let me open the file with it.

    I hope there is a solution.

  • Annalise,

    open a file explorer, and press the alt key. then go to tools --> folder options under the View tab, uncheck the "Hide extensions for known file types" box. I suspect that this is an "examplefile.reg.txt". By default, Windows hides these.

  • Thanks mate :) it really helped :)

  • my ms office is not working problem is modification is not allowed to because selection is locked pls reply

  • Thanks mate, helped me quite a bit and I consider myself smart in IT haha!

  • i don't know how to thank you.....I accidentally tried to open a file with some other program but then the whole programs and even the system programs got changed to different format. I cudn't access microsoft office or any other programs.. i was so frustrated and felt like going for a total format of my computer. I followed your "method 4" and damn it worked. I can't express how happy I was then. I had my online assignment which had to be posted the very next day. anyways, thank you askvg. it really helped me alot

Leave a Comment