Created
October 23, 2017 06:24
-
-
Save wontoncc/6ca3edf95de1b9c22b0fca9156aebeab to your computer and use it in GitHub Desktop.
AHK2: Open Command Line Here in Explorer with Hotkey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@cd/D "%*" | |
@cmd /k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#If WinActive("ahk_class CabinetWClass") ; explorer | |
F8:: | |
for window in ComObjCreate("Shell.Application").Windows | |
try Fullpath := window.Document.Folder.Self.Path | |
Run "cmd", Fullpath | |
return | |
F9:: | |
for window in ComObjCreate("Shell.Application").Windows | |
try Fullpath := window.Document.Folder.Self.Path | |
Run '*RunAs "path\to\cmd-admin-here.bat" ' Fullpath ; see the .bat above | |
return | |
#If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment