is there a way to do runas and have it execute with admin privileges with having use #requireadmin in the program executed by runas..
If I run this, it returns test 0
here is simple example
test.exe:
msgbox(0,@username,isadmin())
So I am running, the script with admin permissions, I do run as and it shows it is not admin.
If I put #requireadmin in test.exe, it will prompt me again, but i only want the one prompt
If I run this, it returns test 0
here is simple example
test.exe:
msgbox(0,@username,isadmin())
[/size] [size=4]#RequireAdmin ; Fill in the username and password appropriate for your system. Local $sUserName = "test" Local $sPassword = "test"[/size] [size=4]Local $pid = RunAsWait($sUserName, @ComputerName, $sPassword, 0, 'test.exe', @SystemDir)[/size] [size=4]
So I am running, the script with admin permissions, I do run as and it shows it is not admin.
If I put #requireadmin in test.exe, it will prompt me again, but i only want the one prompt