mIRC Home    About    Download    Register    News    Help

Print Thread
/run -a #266147 10/10/19 04:58 AM
Joined: Jan 2004
Posts: 1,212
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,212
Related to this, In 32bit Windows7, /run -a fails to launch 16bit DOS executibles.

success:
/run c:\windows\system32\command.com /k
fails:
/run -a c:\windows\system32\command.com /k

If mIRC itself is running as admin, the target program runs in admin mode without the -a switch, as happens to all programs launched from a client itself running in admin mode.

workaround success:
/run -a cmd /c c:\windows\system32\command.com /k

Re: /run -a [Re: maroon] #266148 10/10/19 08:07 AM
Joined: Dec 2002
Posts: 4,578
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,578
Thanks for your bug report. This is a Windows API limitation. You would need to use the method you are using in your post to get around it.

Re: /run -a [Re: Khaled] #266180 15/10/19 09:42 PM
Joined: Jan 2004
Posts: 1,212
maroon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,212
The new $isadmin works as expected in win7-32. Assuming that there's no effective difference between using /run's -a switch if mirc.exe itself is already running in elevated privileges, it might be reasonable to have everyone skip using the new API as superfluous.

One slight change might be to conform with other identifiers that return $true or $false, instead of the current 1 or 0. Unless there's the intent to switch over to this type of return value, like $compress does. I know there's no effective difference inside if() boolean logic.