Sign in to follow this  
Followers 0

Syntax problem in RunAsWait function

2 posts in this topic

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)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

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  
Followers 0