Trying to Get VB Script to Run

(imported topic written by dlong91)

Hello, I’m trying to get a fixlet to run a vbscript. Here is a copy of what i’m working with:

copy __Download\nic.exe c:\nic.exe

//runswinzip to extract files

waithidden cmd.exe /c c:\nic.exe /auto c:\

wait c:\windows\system32\cscript.exe c:\setspeed.vbs

Self extracting exe puts the setspeed.vbs in root of c. Trying to run the script with a variety of commands and syntax with no luck.

Any ideas would be greatly appreciated!

(imported comment written by BenKus)

What error do you get?

Ben

(imported comment written by mike.armstrong91)

I have the same issue when trying to launch VBScripts. My logs say

Command succeeded dos cscript “C:\Program Files (x86)\Bigfix Enterprise\BES Client__BESData\actionsite__Download\CreateVirtualMachine.wsf” -path:“D:\Innovapost XP Mode\Innovapost XP Mode.vhd” -vmname:“Innovapost XP Mode” (fixlet 177475)

If I put the same command (minus the dos) into a command prompt window, it works fine. the VBScript does not do anything if run from Bigfix.

(imported comment written by mike.armstrong91)

I ran across another post, and thought it might be able to help us. The code is

prefetch RunAsCurrentUser.exe sha1:5512ef51a98dff1aa910a8189a0361c161fa703f size:212992 http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.2.exe
waithidden __Download\RunAsCurrentUser.exe --w cmd.exe /c "cscript.exe D:\CreateVirtualMachine.wsf -p:D:\Innovapost XP Mode\Innovapost XP Mode.vhd -vn:Innovapost XP Mode"

Bigfix says the command ran successfully with exit code 0. However, the virtual machine did not get added to the application. Normally, I would have quotes around the full paths… but I don’t know how to quote inside of a quote.

Anyone able to help me out?

(imported comment written by mike.armstrong91)

Got it working. final command was

waithidden __Download\RunAsCurrentUser.exe --w cmd.exe /c cscript.exe "D:\CreateVirtualMachine.wsf" -p:"D:\Innovapost XP Mode\Innovapost XP Mode.vhd" -vn:"Innovapost XP Mode"