Jump to content
Sign in to follow this  

Syntax problem in RunAsWait function

Recommended Posts

Hello all, 


I'm totally new to AutoIt and I need it to run an installer as another account because it fails in SCCM when running as the System account. I can work around it with a Task Sequence, but then I can't display pop-ups to the user. In short: I believe AutoIt is the tool to use here, but I can't get part of the command to work. Below is what I have.


Working not-silent install

;$CMD_ReturnCode = RunAsWait($User,$Domain,$Password,$RUN_LOGON_NOPROFILE,@ComSpec & " /c " & '"' & @ScriptDir & '\..\Install\Universal Type Client 5.0.0.exe"',"",@SW_HIDE)


Working silent install but I need to pass the /norestart parameter as well, on the same level as the /qb! parameter. In a CMD it would look like this, including the quotes: "*.exe" /S /V"/qb! /norestart". Whatever combination of single/double quotes I use to link /qb! and /norestart together, I can't get it to work :( 

;$CMD_ReturnCode = RunAsWait($User,$Domain,$Password,$RUN_LOGON_NOPROFILE,@ComSpec & ' /c ""' & @ScriptDir & '\..\Install\Universal Type Client 5.0.0.exe"" /S /V/qb{!}',"",@SW_HIDE)


Any help is greatly appreciated.


Share this post

Link to post
Share on other sites

Something like this maybe:

$CMD_ReturnCode = RunAsWait($User,$Domain,$Password,$RUN_LOGON_NOPROFILE,@ComSpec & ' /c "' & @ScriptDir & '\..\Install\Universal Type Client 5.0.0.exe" /S /V"/qb! /norestart"',"",@SW_HIDE)


Share this post

Link to post
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
Sign in to follow this  

  • Create New...