
In any explorer window first go to Tools > Folder Options > View and enable 'View full path in Title Bar'
After that when this script is running just type '/' in the address bar of explorer window and type a DOS command to run it hidden.
And to run it visibly and keep the command prompt window after that command, just use '//' instead of '/'
;___________________________________________ ;______Easy Command Prompt - Rajat_________ ; Type '/' in the address bar of explorer window and type ; a DOS command to run it hidden. ; And to run it visibly and keep the command prompt ; window after that command, just use '//' instead of '/' Hotkey, Enter, Prompt Hotkey, Enter, Off exit ~/:: do = n ControlGetFocus, ctl, A IfWinActive, ahk_class CabinetWClass,, IfEqual, ctl, Edit1, setenv, do, y IfWinActive, ahk_class ExploreWClass,, IfEqual, ctl, Edit1, setenv, do, y IfEqual, do, n, Return WinGetActiveTitle, pth Hotkey, Enter, On Return Prompt: Hotkey, Enter, Off do = n ControlGetFocus, ctl, A IfWinActive, ahk_class CabinetWClass,, IfEqual, ctl, Edit1, setenv, do, y IfWinActive, ahk_class ExploreWClass,, IfEqual, ctl, Edit1, setenv, do, y IfEqual, do, n { Send, {Enter} Return } ControlGetText, cmd, Edit1, A StringLeft, check, cmd, 2 IfEqual, check, // { StringTrimLeft, cmd, cmd, 2 run, %comspec% /k %cmd%, %pth% } IfNotEqual, check, // { StringTrimLeft, cmd, cmd, 1 run, %comspec% /c %cmd%, %pth%, hide } ControlSetText, Edit1, %pth%, %pth% Return