Jump to content

Going nuts trying to run VolumeID.exe with parameters


Recommended Posts

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")
Link to comment
Share on other sites

RunAsWait ( "username", "domain", "password", logon_flag, "program" [, "workingdir" [, show_flag [, opt_flag]]] )

No, never mind, that couldn't be the problem. Carry on.

Edited by LaCastiglione
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...