On a command prompt, there is an executable in Windows called
cscript.exe that can be used to run Visual Basic Scripts. It resides in
C:\WINDOWS\system32 directory.
For example:
C:\WINDOWS\system32\cscript.exe Test.vbsTo run a script as a batch file (.bat), with credentials, create a batch file use the following syntax.
For Reference:
http://forum.localgeek.us/viewtopic.php?f=3&t=9To prompt you for the password:
runas /user:username "cscript.exe //D \\avnwdc13\renameprof\install_service.vbs"To include the password:
runas /user: username /password:password "cscript.exe //D \\avnwdc13\renameprof\install_service.vbs"In the K1000 Environment:The following example uses
"Launch a program" in the SMA scripting to call a Visual Basic Script:
On Success
1. Launch “$(KACE_SYS_DIR)\cscript.exe” with params
“”$(KACE_DEPENDENCY_DIR)\dump_eventlog.vbs“
”$(KACE_DEPENDENCY_DIR)\eventlog.txt“”.Or create a batch file to call your script:
C:\WINDOWS\system32\cscript.exe Test.vbsRemember to attach the actual vbs script file in the dependencies section.