PDA

View Full Version : Command with quotes in it fails in vbs CA



sgraju
05-26-2008, 09:50 PM
Hi,

I am having problems when executing a command with quotes in it as part of a vbs CA. The script that I want to execute is below.

'Global Variables
Dim WshShell

'Main Entry

RegisterAms

Sub RegisterAms
Set WshShell=CreateObject("WScript.Shell")
WshShell.run "AVMediaServer.exe /i""C:\Program Files\Avega Media Centre\Avega Media Server"""
End Sub

It works fine if I double click on it but when I run it as a CA on installing, it does not work. It fails with:

Error 1720.There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action RegisterAMS script error -2147024894, : Line 10


If replace the command with one without quotes in it, it installs fine :
WshShell.run "AVMediaServer.exe /u"

Just to be certain, I also changed the Ignore Exit Code set to Yes and installed it. If I double click it from the actual location that it installed to and it works fine.

Any help is greatly appreciated.

Regards
Suresh