dwjp90
Joined: 20 Jul 2009 Posts: 40
|
Posted: Sat Nov 21, 2009 1:34 am Post subject: Restore ctrl+shift+Enter to run selected as admin |
|
|
this return the ability to hit ctrl+shift+enter and it will run the selected file as an admin (exes only)
works in start menu, explorer and desktop
requirements
heres the code
| Code: | $^+Enter::
{
ifwinactive, ahk_class DV2ControlHost
{
sleep 400
Clipboard:=""
sleep 400
send {appskey}{down}{down}{down}{enter}
clipwait
run "C:\Program Files\hstart\hstart.exe" /runas /shell "%clipboard%" ;runs selected file as admin
return
}
else ifwinactive, ahk_class Progman
{
Clipboard:=""
Send ^c
ClipWait,1
Clipboard:=Clipboard
run "C:\Program Files\hstart\hstart.exe" /runas /shell "%Clipboard%" ;runs the selected file as admin
return
}
else ifwinactive, ahk_class CabinetWClass
{
Clipboard:=""
Send ^c
ClipWait,1
Clipboard:=Clipboard
run "C:\Program Files\hstart\hstart.exe" /runas /shell "%Clipboard%"
return
}
else
{
;msgbox, Not active ;enable this to test
send ^+{enter}
}
}
return |
|
|