Skip to content

Instantly share code, notes, and snippets.

@riipandi
Created April 12, 2019 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riipandi/39d184d7942124361276520b19a9d576 to your computer and use it in GitHub Desktop.
Save riipandi/39d184d7942124361276520b19a9d576 to your computer and use it in GitHub Desktop.
Add Open with Notepad context menu.
[version]
signature="$CHICAGO$"
[NotepadContextInstall]
CopyFiles = NotepadContext.Files.Inf
AddReg = NotepadContext.AddReg
[DefaultInstall]
CopyFiles = NotepadContext.Files.Inf
AddReg = NotepadContext.AddReg
[DefaultUnInstall]
DelFiles = NotepadContext.Files.Inf
DelReg = NotepadContext.DelReg
[SourceDisksNames]
55="Open with Notepad (as Admin)","",1
[SourceDisksFiles]
NotepadContext.INF=55
[DestinationDirs]
NotepadContext.Files.Inf = 17
[NotepadContext.Files.Inf]
NotepadContext.INF
[NotepadContext.AddReg]
HKLM,%UDHERE%,DisplayName,,"%NotepadContextName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll, SetupInfObjectInstallAction DefaultUninstall 132 %17%\NotepadContext.inf"
HKCR,*\Shell\runas,,,"%NotepadContextAccel%"
HKCR,*\Shell\runas\command,,,"%11%\notepad.exe ""%1"""
[NotepadContext.DelReg]
HKLM,%UDHERE%
HKCR,Directory\Shell\runas
HKCR,Drive\Shell\runas
[Strings]
NotepadContextName="Open with Notepad (as Admin) PowerToy (Uninstall only)"
NotepadContextAccel="Open with Notepad (as Admin)"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\NotepadContext"
Windows Registry Editor Version 5.00
; created by Walter Glenn
; for How-To Geek
; article: http://www.howtogeek.com/281490/how-to-add-open-with-notepad-to-the-windows-context-menu-for-all-files/
[HKEY_CLASSES_ROOT\*\shell\Open with Notepad\command]
@="notepad.exe %1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment