carlosrapa 0 Posted January 5, 2012 I will admit I am new at this but I can not seem to get this to run... and it is driving me nuts, I know I am missing something simple. If I were to manually run this application I have to do a runas (administrator) on the command prompt and type: c:\volumeid.exe c: 1234-1234 then close the command prompt. I think it is launching the volumeid.exe application but not passing the c: 1234-1234 to it. The $volumeid is random at runtime but for the example I made it static. In the real coding by the time I get to part it is randomized. Thanks for your help in advance. $volumeid = "1234-1234" Local $sUserName = "Administrator" Local $sPassword = "12345678" Local $AppA = "c:\volumeid.exe c: " Local $App = $AppA & $volumeid Local $pid = RunAsWait($sUserName, @ComputerName, $sPassword, 0, $App) ; Wait for the process to close. ProcessWaitClose($pid) MsgBox(64, "", "Successful VolumeID Change") Share this post Link to post Share on other sites
jaberwacky 327 Posted January 5, 2012 Says in the help file that if you don't specify a working directory then @SystemDir will be used. I"m not sure if that will make a difference. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
carlosrapa 0 Posted January 5, 2012 Says in the help file that if you don't specify a working directory then @SystemDir will be used. I"m not sure if that will make a difference. I think that is set in $AppA right? So the final non-variable result would be: Local $pid = RunAsWait(Administrator, @ComputerName, 12345678, 0, C:volumeid.exe c: 1234-1234) Share this post Link to post Share on other sites
jaberwacky 327 Posted January 5, 2012 (edited) RunAsWait ( "username", "domain", "password", logon_flag, "program" [, "workingdir" [, show_flag [, opt_flag]]] ) No, never mind, that couldn't be the problem. Carry on. Edited January 5, 2012 by LaCastiglione Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites