Skip to content

Instantly share code, notes, and snippets.

@Iquaridys
Created September 19, 2017 03:34
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 Iquaridys/e3131975c20812a2f2145903c1ba9940 to your computer and use it in GitHub Desktop.
Save Iquaridys/e3131975c20812a2f2145903c1ba9940 to your computer and use it in GitHub Desktop.
Add Open with Notepad as Admin to the Right-click Menu
[version]
signature="$CHICAGO$"
[NotepadAsAdminInstall]
CopyFiles = NotepadAsAdmin.Files.Inf
AddReg = NotepadAsAdmin.AddReg
[DefaultInstall]
CopyFiles = NotepadAsAdmin.Files.Inf
AddReg = NotepadAsAdmin.AddReg
[DefaultUnInstall]
DelFiles = NotepadAsAdmin.Files.Inf
DelReg = NotepadAsAdmin.DelReg
[SourceDisksNames]
55="Notepad as Admin","",1
[SourceDisksFiles]
NotepadAsAdmin.INF=55
[DestinationDirs]
NotepadAsAdmin.Files.Inf = 17
[NotepadAsAdmin.Files.Inf]
NotepadAsAdmin.INF
[NotepadAsAdmin.AddReg]
HKLM,%UDHERE%,DisplayName,,"%NotepadAsAdminName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll, SetupInfObjectInstallAction DefaultUninstall 132 %17%\NotepadAsAdmin.inf"
HKCR,*\Shell\runas,,,"%NotepadAsAdminAccel%"
HKCR,*\Shell\runas\command,,,"%11%\notepad.exe ""%1"""
[NotepadAsAdmin.DelReg]
HKLM,%UDHERE%
HKCR,Directory\Shell\runas
HKCR,Drive\Shell\runas
[Strings]
NotepadAsAdminName="Notepad as Admin Iquaridys (Uninstall only)"
NotepadAsAdminAccel="Notepad as Admin"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\NotepadAsAdmin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment