1.    03 Jan 2016 #1
    Join Date : Jan 2016
    Posts : 3
    Windows 10

    File association problem with .reg and .bat files


    Asus laptop with WINDOWS 10

    When double clicking a .reg file the default action is merge by running the regedit.exe. On the right-click content menu I have Merge (in bold), edit and print, select edit opens the notepad for editing. In order to prevent from merging the .reg file by accidental double clicking, i prefer edit be the default action of double clicking. I went to setting to change the file association from reg editor (the default) to notepad. Then i can't merge the .reg file any more. On the right-click content menu i get open(in bold), edit and print, Notepad opens when i select open, edit or double click. I remember that i can do this by tweaking the registry entery in WinXP but now i forgot how.

    I also want to change the associated default app for .bat from run (by cmd.exe) to edit (by notepad) due to the same reason but can't find a way.

    Will you please help, thank you very much!

    Happy 2016 to all, regards.


    SLo
      My ComputerSystem Spec
  2.    03 Jan 2016 #2
    Join Date : Oct 2013
    Posts : 25,642
    64-bit Windows 10 Pro build 17046

    Hello SLo, and welcome to Ten Forums.

    You might see if the "Open with Notepad" context menu added by the tutorial below may work for you for this.

    Open with Notepad - Add or Remove from Context Menu of Files - Windows 7 Help Forums
      My ComputersSystem Spec
  3.    03 Jan 2016 #3
    Join Date : Jan 2016
    Posts : 3
    Windows 10
    Thread Starter

    Quote Originally Posted by Brink View Post
    Hello SLo, and welcome to Ten Forums.

    You might see if the "Open with Notepad" context menu added by the tutorial below may work for you for this.

    Open with Notepad - Add or Remove from Context Menu of Files - Windows 7 Help Forums

    Thank you for your reply, but the "Add open with Notepad to content menu" method dose not help.
    I may not make myself clear. Please refer to the attached sreenshotClick image for larger version. 

Name:	Screenshot (3).png 
Views:	2 
Size:	488.5 KB 
ID:	56927
    "open with notepad" is already here. At the top i have an option "edit" it also opens the notepad for reg entry editing. It is fine. What i want is a way to change the default double click action from "opening the regedit.exe for merging the new entry" to "opening the notepad for editing",and keep the right click content menu unchange.

    SLo
      My ComputerSystem Spec
  4.    03 Jan 2016 #4
    Join Date : Oct 2013
    Posts : 25,642
    64-bit Windows 10 Pro build 17046

    I'm not sure you can change the default double click (open) action without changing the default program to be "Notepad", but this would also effect "Merge" by changing "Merge" to "Open".
      My ComputersSystem Spec
  5.    03 Jan 2016 #5
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,368
    Windows 10 Pro X64 16299.19

    It's not unsafe to have Merge as the default since you have to then click Yes on the next "are you sure" window which gives you a chance to cancel the action.

    Click image for larger version. 

Name:	Areyousure.jpg 
Views:	28 
Size:	19.6 KB 
ID:	56941
      My ComputersSystem Spec
  6.    03 Jan 2016 #6
    Join Date : Dec 2015
    Posts : 52
    Microsoft Windows 10 Home

    I made the same mistake a while back. Open With is a piss-poor implementation in my opinion --- the old file type dialog that let you associate any verb with any command was much better.

    Anyway, to restore the default before your accidental association, you need to delete the UserChoice subkey
    under (check both locations but don't worry if not found)

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.reg

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.reg

    That should return you to the default of Merge as the default verb.

    Then, to make Edit the default while retaining Merge as a right-click option, go to:

    HKEY_CLASSES_ROOT\regfile\shell

    Double-click (Default) in the right-hand pane & type "edit" (without quotes).

    Keith
      My ComputerSystem Spec
  7.    05 Jan 2016 #7
    Join Date : Jan 2016
    Posts : 3
    Windows 10
    Thread Starter

    Quote Originally Posted by KeithM View Post
    I made the same mistake a while back. Open With is a piss-poor implementation in my opinion --- the old file type dialog that let you associate any verb with any command was much better.

    Anyway, to restore the default before your accidental association, you need to delete the UserChoice subkey
    under (check both locations but don't worry if not found)

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.reg

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Roaming\OpenWith\FileExts\.reg

    That should return you to the default of Merge as the default verb.

    Then, to make Edit the default while retaining Merge as a right-click option, go to:

    HKEY_CLASSES_ROOT\regfile\shell

    Double-click (Default) in the right-hand pane & type "edit" (without quotes).

    Keith

    Thanks a lot, it works!!
      My ComputerSystem Spec
  8.    05 Jan 2016 #8
    Join Date : Dec 2015
    Posts : 52
    Microsoft Windows 10 Home

    You're welcome. Glad it's sorted.

    And thanks for letting me know. That was a lot of typing/cutting/pasting for someone who's legally blind!

    It's the positive feedback that makes it worth the effort.

    Keith
      My ComputerSystem Spec
  9.    05 Jan 2016 #9
    Join Date : Apr 2014
    Space coast of Florida
    Posts : 5,368
    Windows 10 Pro X64 16299.19

    Thanks for the great info Keith. You can bet I saved it for future use.
      My ComputersSystem Spec

 


Similar Threads
Thread Forum
Solved File extension not in file association list
Hello, I use Notepad++ to edit Python files which have the file extension .py such as "sample.py" I would like to set Notepad++ as the default program to open .py files. When I open a .py file I get the popup asking me which file I want to use...
Software and Apps
How do i change the file association for SCR files
Hi, I use files with an SCR extension to store text data. For me SCR means script. I would like it so that when I double-click on this file, that it opens with notepad (or something similar). But this file is registered as a screen saver. And...
General Support
QIF File Association no longer works after windows upgrade
After the recent Windows 10 update my QIF file association launches the incorrect version of Microsoft Money. Money is an old legacy programme that is still running JUST ...and I need to be able to customise the file association. If I click...
Software and Apps
Windows 10 search opens 'word' incorrect file association
When I use the left hand side search and click on results other than 'web', a word document is opened! How do I reset the correct app association for this action/file type. Thank you in advance
General Support
No jpg file association ?
I double clicked on xxx.jpg and LibreOffice opened. I wanted to change the program to IrfanView. I went in through Start > search > associations. How could they screw that up ?
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 23:20.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums