Hoardling Posted September 3, 2010 Share Posted September 3, 2010 I am trying to get a .exe on a CD\DVD to run under administrative rights using AutoIT. My code looks like this: RunAs("SysAdministrator","Domain","Password",0,"D:\run.exe") It doesn't seem to want to run. Not sure what I am doing wrong. It is simply getting and .exe to run from a CD\DVD under Admin rights. Any ideas or am I totally doing this wrong? Thank You. Planets come and go. Stars perish. Matter disperses, coalesces, forms into other patterns, other worlds. Nothing can be eternal. Dr. Who Link to comment Share on other sites More sharing options...
enaiman Posted September 5, 2010 Share Posted September 5, 2010 I don't know what are you doing wrong; I never used any other flag that 2 (Network credentials only) Did you try that flag value? Are you sure that all the parameters you use are correct? The code is simple enough to not worry about anything else but paramaters. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
Juvigy Posted September 6, 2010 Share Posted September 6, 2010 $d1='Domain' $d2=@ComputerName $u="User" $p="Password" If not IsAdmin() Then $e=RunAs($u, $d1, $p,0,@ScriptName,@ScriptDir) Try this -should start the whole script with admin rights and then you can shellexecute the files from the CD/DVD Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now