← Playground

Start CMD as admin

18dfa99d9ceab46269c953f6ce03a8b8a2af8ab6 · darakna · Dec 30, 2019 02:35

+46 · 1 file changed

  • Windows/Add_Open_command_window_here_as_administrator.reg +46 −0
diff --git a/Windows/Add_Open_command_window_here_as_administrator.reg b/Windows/Add_Open_command_window_here_as_administrator.reg
new file mode 100644
index 0000000..718699e
--- /dev/null
+++ b/Windows/Add_Open_command_window_here_as_administrator.reg
@@ -0,0 +1,46 @@
+Windows Registry Editor Version 5.00
+
+; Created by: Shawn Brink
+; Created on: August 10th 2016
+; Updated on: October 10th 2019
+; Tutorial: https://www.tenforums.com/tutorials/59686-open-command-window-here-administrator-add-windows-10-a.html
+
+
+
+[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin]
+@="Open command window here as administrator"
+"Extended"=-
+"Icon"="imageres.dll,-5324"
+
+[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin\command]
+@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,\"\"%V\"\"' -Verb RunAs\""
+
+
+
+[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin]
+@="Open command window here as administrator"
+"Extended"=-
+"Icon"="imageres.dll,-5324"
+
+[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHereAsAdmin\command]
+@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,\"\"%V\"\"' -Verb RunAs\""
+
+
+
+[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin]
+@="Open command window here as administrator"
+"Extended"=-
+"Icon"="imageres.dll,-5324"
+
+[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHereAsAdmin\command]
+@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V' -Verb RunAs\""
+
+
+
+[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin]
+@="Open command window here as administrator"
+"Extended"=-
+"Icon"="imageres.dll,-5324"
+
+[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHereAsAdmin\command]
+@="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,\"\"%V\"\"' -Verb RunAs\""