Page 1 of 1

VisualBasicScript - seem doesnt work

Posted: Thu Apr 09, 2009 7:52 am
by Bar_BQ
I'm trying to run a visual basic script through the function "Run program as" with command:

wscript.exe $SUPPORTDIR$\\my_script.vbs

That script should generate a text file, but it looks it doesn't work. The script itself works fine.

Could anybody help?

Posted: Thu Apr 09, 2009 9:52 am
by bokkie
Bar_BQ,

Does it write output to the DOS window? If so, you might need to redirect the output to a text file and read that in your MSIcode. I don't recall the syntax to hand but something like:

wscript.exe $SUPPORTDIR$\\my_script.vbs > C:\\Temp\\my_output.txt

If your script writes to a text file directly then you can certainly read that file as well.

Posted: Thu Apr 09, 2009 10:05 am
by Bar_BQ
Thank you bokkie for easy solution :)

Posted: Thu Apr 09, 2009 10:24 am
by bokkie
Bar_BQ wrote:Thank you bokkie for easy solution :)
You're welcome. You can send the $5K fee to me. :lol:

Posted: Fri Apr 10, 2009 11:22 am
by bmenot
does this actually work? what i mean is, does the redirection work outside the command shell?

Posted: Fri Apr 10, 2009 3:10 pm
by MichaelNesmith
The shell is just cmd.exe which has command line parameters suitable for your requirements viewable by running cmd.exe /?.