Jump to content
Sign in to follow this  

RUN VBS within AutoIT

Recommended Posts


Hi can anyone help me with this problem?

I would like to use the Rusasset command to run a VBS script.

The following command is shown as below;

RunAsSet('rspsgh0005', 'HBAP','*rsprsp05')

Set WshShell = CreateObject("WScript.Shell")

WshShell.Run "cscript.exe""\\\vm\scripts\updatepolicy.vbs"

It shows me error on Set WshShell = CreateObject("WScript.Shell") statement

==> Missing separator character after keyword.:

How do i modify this code or is there a better way to run this script updatepolicy.vbs

Can anyone help me?

Thank you

Share this post

Link to post
Share on other sites

Welcome to autoit. This is out of the helpfile RunAsSet.

Initialise a set of user credentials to use during Run and RunWait operations. 2000/XP or later ONLY.

RunAsSet('rspsgh0005', 'HBAP','*rsprsp05')

RunWait(@ComSpec & ' /c cscript.exe "\\\vm\scripts\updatepolicy.vbs"', @ScriptDir, @SW_SHOW)

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.