Jump to content

Reg tweak to make notepad default app to use


Recommended Posts

Ok i am using this tweak to add the option to open unkown file types with notepad:

;----- Makes a right click option for unknown files (Open with notepad)

;-----

[HKEY_CLASSES_ROOT\*\shell]

@="\"notepad.exe %1\""

[HKEY_CLASSES_ROOT\*\shell\open]

@="Open &With Notepad"

[HKEY_CLASSES_ROOT\*\shell\open\command]

@="notepad.exe %1"

Is there a tweak to have ever file that i open via the open with notepad option to from that point on show open with notepad as if i had gone into the file and clicked open and then selected notepad as the default program to open the file and put a check in "Always use the selected program to open this type of file" Does this make sense....

Link to comment
Share on other sites


I think it's possible from a batch file, but I can't cough up a file right now. I'll see what I can do :)

Edit: I'm not sure if this will always work, if you find some errors tell me and I'll see if I can fix it.

@ECHO OFF

FOR /F "tokens=2 delims=." %%A IN ("%1") DO SET EXT=%%A

REG ADD HKCR\.%EXT%\shell\open\command /VE /D "notepad.exe %%1" /F

START notepad.exe %1

EXIT

Save this as notepad.bat and put it in your system32 directory. Then import this to the registry:

[HKEY_CLASSES_ROOT\*\shell]
@="notepad.bat \"%1\""
[HKEY_CLASSES_ROOT\*\shell\open]
@="Open &With Notepad"
[HKEY_CLASSES_ROOT\*\shell\open\command]
@="notepad.bat \"%1\""

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...