Context menu -> Run Unsandboxed
Posted: Tue Jan 19, 2016 1:15 pm
Thanks to @BUCKAROO (ZIP & OP is here http://forums.sandboxie.com/phpBB3/view ... 85#p114094
Bonus fun with File Association verbs
Code: Select all
REGEDIT4
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\sansbox]
@="Run &Unsandboxed"
"Icon"="\"C:\\Program Files\\Sandboxie\\Start.exe\",-104"
[HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\sansbox\command]
@="\"C:\\Program Files\\Sandboxie\\Start.exe\" /disable_force \"%1\" %*"
Code: Select all
REGEDIT4
[-HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\sansbox]
Code: Select all
; *verb usage
; AutoHotkey:
IsSandboxed:=!!DllCall("GetModuleHandle","Str","SbieDll")
if(A_IsCompiled)
Target="%A_ScriptName%"
else
Target="%A_AhkPath%" "%A_ScriptName%"
if(!IsSandboxed) ; Sandbox ourself
{
Run,*sandbox %Target%,%A_ScriptDir%
; ExitApp
}
if(A_IsCompiled)
{
MsgBox,fizzle...
ExitApp
}
else
{
if(IsSandboxed)
Target:=TargetAhk("MsgBox`,There's no such escape!")
else
Target:=TargetAhk("MsgBox`,Defeats* Force Process.")
Run,*sansbox %Target%
}
TargetAhk(string)
{
string="%ComSpec%" /C"ECHO %string%|"%A_AhkPath%" *"
return string
}