Reputation: 891
Im trying to use a VBScript in an WIX/MSI installer, called as such from command line: cscript .vbs
This has been called in a cmd file from an old installer, but is it possible to do it in a single custom action in Wix? I have tried to pass the args with ExeCommand but this then changes the CA type to 66 and tries to execute the . Is this even possible? If so, how does one go about it? I'm resisting the need to "install" the vbs file, run it, then remove it (or leave it in the program files directory).
Upvotes: 1
Views: 1391
Reputation: 20780
You'll need to install it because in your scenario you have no choice except to run it with a cscript command line, and that requires it to be on the system. It won't work hosted as a custom action in Windows Installer because it uses the WScript object, which is supplied by WSH, not Windows Installer. Don't the WiX IIS extensions help?
The other alternative is to modify that script to your requirement so it can be run as a custom action without it being installed - that will depend on how familiar you are with vbscript, and avoid using the WScript object there.
Upvotes: 1