Reputation: 101
I`m currently new to Wix and having trouble with a vbs script that should be run at the end of the installation process.
What do I have so far:
I was able to insert several files and registry calls into my msi file. The installation process works fine, all files are stored in a proper folder and the registry is being updated. Now, I`m trying to call a vbs script at the end of the installation process. The script itself is nothing special, for starters it should just display a message box.
I created a custom action prior to this document (Custom Action Type 6): http://blogs.technet.com/b/alexshev/archive/2008/02/21/from-msi-to-wix-part-5-custom-actions.aspx
The following is being displayed when running the msi file:
'There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnnel or package vendor.'
I tried to implement and run the script in wix like this:
<Binary Id="dasd" SourceFile="C:\Dokumente und Einstellungen\administrator\Desktop\dasd.vbs" />
<CustomAction Id="DoSomething" BinaryKey="dasd" HideTarget="no" Impersonate="no" VBScriptCall="" Execute="deferred" Return="check" />
<InstallExecuteSequence>
<Custom Action="DoSomething" Before="InstallFinalize" />
</InstallExecuteSequence>
The attribute 'VBScriptCall' previously had the value 'Main'. I deleted it, because I am not using a function called 'Main'. I thought that 'Main' wold just run the complete script. However, it`s neither working with 'Main' nor without it.
I`m under the impression that it is not required to have the script file on the file system (during execution of the msi file). May I be wrong here?
Might anyone figure out what`s going wrong here?
Best regards, Markus
Upvotes: 2
Views: 1435
Reputation: 101
finally, I was able to solve the problem. The path to the vbs script was wrong:
<Binary Id="dasd" SourceFile="C:\Dokumente und codeEinstellungen\administrator\Desktop\dasd.vbs" />
I edited the path in the wxs file manually to 'C:\Dokumente und Einstellungen[...]\dasd.vbs' by mistake. WixEdit just sets it to 'dasd.vbs', which is correct in this case.
Maybe someone may find this helpful and doesn`t have to search for too long to solve the case ;-).
Best regards, Markus
Upvotes: 0
Reputation: 10120
Your assumption is wrong: "I`m under the impression that it is not required to have the script file on the file system (during execution of the msi file). May I be wrong here?"
The file needs to be present in the file system. copy it to the particular location using the you WIX script and then everything should be fine.
Upvotes: 1