Skip to content

Instantly share code, notes, and snippets.

@Wind4
Last active October 19, 2024 07:36
Show Gist options
  • Save Wind4/0def3cdc184f2fb8ea2e to your computer and use it in GitHub Desktop.
Save Wind4/0def3cdc184f2fb8ea2e to your computer and use it in GitHub Desktop.
Notepad2
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.xml]
@="Notepad2.xml"
[HKEY_CLASSES_ROOT\Notepad2.xml]
@=".xml file"
"EditFlags"=dword:00010000
[HKEY_CLASSES_ROOT\Notepad2.xml\DefaultIcon]
@="%SystemRoot%\\SysWow64\\shell32.dll,-152"
[HKEY_CLASSES_ROOT\Notepad2.xml\shell]
@="np2open"
[HKEY_CLASSES_ROOT\Notepad2.xml\shell\np2open]
@="Open with Notepad2"
[HKEY_CLASSES_ROOT\Notepad2.xml\shell\np2open\command]
@="\"D:\\Program Files (x86)\\Notepad2_CN\\Notepad2.exe\" \"%1\""
[HKEY_CLASSES_ROOT\.xml]
@="xmlfile"
[HKEY_CLASSES_ROOT\xmlfile\shell]
@="np2open"
[HKEY_CLASSES_ROOT\xmlfile\shell\np2open]
@="Open with Notepad2"
[HKEY_CLASSES_ROOT\xmlfile\shell\np2open\command]
@="\"D:\\Program Files (x86)\\Notepad2_CN\\Notepad2.exe\" \"%1\""
@echo off
SET NP_PATH=%~dp0
SET NP_PATH=%NP_PATH:\=\\%
> ".\OpenWith.reg" ECHO Windows Registry Editor Version 5.00
>>".\OpenWith.reg" ECHO.
>>".\OpenWith.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\np2open]
>>".\OpenWith.reg" ECHO @="Open with Notepad2"
>>".\OpenWith.reg" ECHO.
>>".\OpenWith.reg" ECHO [HKEY_CLASSES_ROOT\*\shell\np2open\command]
>>".\OpenWith.reg" ECHO @="\"%NP_PATH%Notepad2.exe\" %%1"
> ".\IFEO.reg" ECHO Windows Registry Editor Version 5.00
>>".\IFEO.reg" ECHO .
>>".\IFEO.reg" ECHO [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
>>".\IFEO.reg" ECHO "Debugger"="\"%NP_PATH%Notepad2.exe\" /z"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\np2open]
@="Open with Notepad2"
[HKEY_CLASSES_ROOT\*\shell\np2open\command]
@="\"C:\\Program Files\\Notepad2\\Notepad2.exe\" %1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment