Reputation: 1
I'm trying to create this installer with Wix. Before or after InstallFinalize, I need to get the msi file name and then write that file name to config file inside the installation directory. Is this something possible?
Upvotes: 0
Views: 2433
Reputation: 11023
You can access a property in VBS like this:
Dim propValue = Session.Property("OriginalDatabase")
Also, very important, make sure the custom action is immediate. You cannot execute the above from a deferred custom action.
However, I recommend Win32 DLL for a custom action. In it you can use Windows API to read the property value.
Upvotes: 4
Reputation: 55601
The Windows Installer property OriginalDatabase has the path and name of the MSI database. You'll have to parse out the name from the path. WiX's util extension then has custom actions for configuring XML files.
Upvotes: 4