command syntax to run a vbscript

Topics: Archive - General
May 19, 2014 at 2:24 PM
anyone have syntax to execute a vbscript in the powershell tool?

Thanks
May 19, 2014 at 3:14 PM
this produces no output whatsoever it seems:

Execute-Process -FilePath "cscript.exe" -Arguments ""$dirFiles\InstallQuicken2003.vbs"" -WindowStyle Hidden


no log file or anything ....
Coordinator
May 20, 2014 at 12:26 PM
You need to pass it through the pipeline. Try the following
$output = Execute-Process -FilePath "Cscript.exe" -Arguments "//nologo $dirFiles\InstallQuicken2003.vbs" -WindowStyle Hidden -PassThru
Write-Log $output.StdOut
This will run the script and write the output to the default log.

Hope this helps, Dan.
May 20, 2014 at 12:43 PM
sintaxasn wrote:
You need to pass it through the pipeline. Try the following
$output = Execute-Process -FilePath "Cscript.exe" -Arguments "//nologo $dirFiles\InstallQuicken2003.vbs" -WindowStyle Hidden -PassThru
Write-Log $output.StdOut
This will run the script and write the output to the default log.

Hope this helps, Dan.
Wow thanks Dan! That worked. I am a newbie with powershell so I have a steep learning curve to overcome with it but this tool makes it much easier.