Location:
State:
Carrier
Country
Status

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

Hello SLo, and welcome to windowssh blog.

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 blog

Hello SLo, and welcome to windowssh blog.

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 blog

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 sreenshot
"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

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".

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


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 UserChoicesubkey
under (check both locations but don't worry if not found)

HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionExplorerFileExts.reg

HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsRoamingOpenWithFileExts.reg

That should return you to the default of Mergeas the default verb.

Then, to make Editthe default while retaining Mergeas a right-click option, go to:

HKEY_CLASSES_ROOT egfileshell

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

Keith

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 UserChoicesubkey
under (check both locations but don't worry if not found)

HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsCurrentVersionExplorerFileExts.reg

HKEY_CURRENT_USERSOFTWAREMicrosoftWindowsRoamingOpenWithFileExts.reg

That should return you to the default of Mergeas the default verb.

Then, to make Editthe default while retaining Mergeas a right-click option, go to:

HKEY_CLASSES_ROOT egfileshell

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

Keith

Thanks a lot, it works!!

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

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

File association problem with .reg and .bat files