Monday, July 23, 2012

WiX Custom Action - Copy MSI after Install

In WiX there is a functionality to execute application after successfully closing the setup in async mode.
Add following in the .wxs file and execute candle.exe with usual commands.

<Property Id="WixShellExecTarget" Value="[CommonAppDataFolder]Product_Data\test.exe" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
   <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication">NOT Installed</Publish>

In command line compilation for Light.exe following "-ext" needed to add.
These extensions will allow use of WixUIExtension.dll and WixUtilExtension.dll.

light.exe d:\abc\test.wixobj -ext WixUIExtension -ext WixUtilExtension -out d:\abc\test.msi

This is the basic logic behind executing any exe after completing setup. This application executes in async mode and in my case I have used it to copy the present MSI from its present location to program data for safekeeping. This copy MSI is a simple implementation of copying file from one location to another hence not including that code here.



  1. If you are in Jaipur and need beautiful Jaipur Escorts or white skin Jaipur Escorts then you can simply book call girls in Jaipur from one of the best escort agency named Jaipur Escorts. It is No.1 premier escort agency and provide both incall or outcall facility to clients.Please click on the following link to check the official websites Jaipur Escorts


  2. We have a List of Girls who are in financial problems. They need your help. They are ready to sleep with you in some small amounts. Call us for their contact no and help them. To book an escort just drop a call to the given number and ask them what kind of service you want!. You will also WhatsApp us for the availability of ourRussian Escorts in Aerocity . If you’re in the end determined and ready to enjoy the amusing of being at duration the corporate of one of our beautiful girls. Check our other Services...
    Russian Call Girls in Aerocity
    Russian Escorts in Mahipalpur
    Russian Call Girls in Mahipalpur
    Russian Escorts in Mahipalpur
    Call Girls in Mahipalpur