I figured it out.. I used the [OriginalDatabase] parameter which has been 
discussed in this mailing list earlier.

As my installer requires a reboot, here's what I did:

1. Made a script that takes the full path of the installer as an argument. The 
script get the unique id from the filename of the installer and goes online to 
get the corresponding user credentials.
2. Added the script to my .wxs-file like so:

...
<Component Id="CustomScript" Guid="<guid>" Win64="yes">
  <File Source="CustomScript.exe" />
</Component>
...

3. To get the script running after the required reboot I added a registry entry 
in RunOnce with the full path of the installer .msi file like so:
...
<RegistryValue Root="HKCU" 
Key="Software\Microsoft\Windows\CurrentVersion\RunOnce" Name="Some name" 
Type="string" Value='"[INSTALLDIR]CustomScript.exe" "[OriginalDatabase]"' />
...

Don't know if it's the best way to get there, but it works just fine =)

- Jorn 

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to