New
#1
Open Notepad as Administrator with Context Menu?
I'm often having to edit batch files in my C: drive or my windows hosts files and forever running into access permissions issues.
I've seen a few posts showing how you can make a registry style hack to add a right-click option to open a file as notepad as admin, but none of them seem to work in Windows 10?
Here's the code that I found to create an .inf file to do this for Win8 (it doesn't work for me in Win10). I'm wondering if any gurus here could help me modify it to work on Windows 10?
Code:[version]Signature="$Windows NT$"Class="Open in Notepad As Admin for Win8.1"Provider="%Microsoft%" [OpeninNotepadAsAdminInstall]CopyFiles = OpeninNotepadAsAdmin.Files.InfAddReg = OpeninNotepadAsAdmin.AddReg [DefaultInstall] CopyFiles = OpeninNotepadAsAdmin.Files.Inf AddReg = OpeninNotepadAsAdmin.AddReg [DefaultUnInstall] DelFiles = OpeninNotepadAsAdmin.Files.Inf DelReg = OpeninNotepadAsAdmin.DelReg [SourceDisksNames] 55="Open in Notepad as Admin","",1 [SourceDisksFiles] OpeninNotepadAsAdmin.INF=55 [DestinationDirs] OpeninNotepadAsAdmin.Files.Inf = 17 [OpeninNotepadAsAdmin.Files.Inf] OpeninNotepadAsAdmin.INF [OpeninNotepadAsAdmin.AddReg] HKLM,%UDHERE%,DisplayName,,"%OpeninNotepadAsAdminName%" HKLM,%UDHERE%,DisplayIcon,,"C:\Windows\notepad.exe,0" HKLM,%UDHERE%,DisplayVersion,,"%DisplayVersion%" HKLM,%UDHERE%,DisplayPublisher,,"%DisplayPublisher%" HKLM,%UDHERE%,DisplaySize,,"%DisplaySize%" HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll, SetupInfObjectInstallAction DefaultUninstall 132 %17%\OpeninNotepadAsAdmin.inf" HKCR,*\Shell\runas,,,"%OpeninNotepadAsAdminAccel%" HKCR,*\Shell\runas,Icon,,"C:\\Windows\\system32\\notepad.exe,0" HKCR,*\Shell\runas\command,,,"%11%\notepad.exe ""%1""" HKCU,%IEHERE%,Secondary Start Pages,0x00010008,"%DisplayURL%";FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND [OpeninNotepadAsAdmin.DelReg] HKLM,%UDHERE%HKCR,*\shell\runas HKCR,Directory\Shell\runas HKCR,Drive\Shell\runas; HKCU,%IEHERE%,Secondary Start Pages,0x00010020,"%DisplayURL%"; did not work to uninstall website, removed all 2nd websites now way to save what you had [Strings] DisplayPublisher = "Microsoft" OpeninNotepadAsAdminName="Open in Notepad as Admin [by MetadataConsulting.ca](Uninstall only)" DisplayVersion = "2014.04.27" DisplaySize = "4 Kb" DisplayURL = "http://metadataconsulting.blogspot.ca/" OpeninNotepadAsAdminAccel="Open in Notepad as Admin" UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\OpeninNotepadAsAdmin" IEHERE="Software\Microsoft\Internet Explorer\Main"