Hello Sony,
This is happening because you must provide the full path to the BAT in your VBScript.
Does the BAT file reside on the target machine or installed along with your package?
Regards,
Mihai
Code: Select all
WSO.run "%comspec% /c install-service.bat """& Parameter &"""", WindowStyleStealth, false
Bat doesnt reside on the target machine. It will be installed along with the package.This is happening because you must provide the full path to the BAT in your VBScript.
Does the BAT file reside on the target machine or installed along with your package?
If you want to use the same variable in your BAT file path and the BAT will be installed on the target machine along with the package, here is the correct syntax for the last line of your VBScript:Is this a correct of giving the bat path?
Code: Select all
WSO.run "%comspec% /c " & Parameter & "\NGN Posting Service\install-service.bat """ & Parameter & """", WindowStyleStealth, false
The VBScript cannot run separately because it is using a Session object that is only available when attached as a custom action. I have tested the same sample on 3 different machines(XP and Vista) and it works fine.I have tested your sample. In the sample project, the bat file is not getting executed and not creating the output.txt file under D:\ folder location. When I have executed the vbscript separately, its creating the output file successfully.
A simpler way to achieve the same functionality is described in this how to from our user guide.Any other suggestion?
This suggestion worked for me!! Thank alot for your time and suggestions.A simpler way to achieve the same functionality is described in this how to from our user guide.