From MSI to WiX

Русская версия здесь.


This is a series of articles on building installation packages using WiX.


Comments (28)
  1. Serguei Razykov says:

    Excellent postings, very useful. It’s always good to see real examples

  2. Lyle Hollenbeck says:

    Can you point me to some information on how to keep the package from registering itself so that every time the install package is started it will function like it was the first time installation?  I realize this is not very normal but that is the way my company wants this particular package to work.  I came across some property settings that might cause this type of functionality but I did not write them down.   And I really would rather not have a CA that launches msizap.exe to remove the install information.  Thanks.  Lyle

  3. New Age Solution says:

    Thank you so much for this blog. It helped me out tramendously in understanding Wix. One of the best one I found on the net that explains everything with real example… I am keeping this blog  as my favorite..

  4. Alex Shevchuk says:

    To Lyle Hollenbeck:

    Sorry for being so late.  Sounds, like you need Major Upgrade.  It will require some extra work on your part, but the good news is that there will be no need for msizap.

  5. qterry56 says:

    I really appreciate and enjoy your tutorial – it is one of the few great WIX / MSI resources.  

    Is there a reason why i cant access the Chapters 4 & 18? (I cant wait to see how the story ends!) 🙂

    Thanks again,

    We here at Harley-Davidson salute you as an honorary “Rider” –

  6. Matthew says:

    большое спасибо!

    I really appreciate your work here. We are moving from using the built-in Visual Studio deployment projects to using WiX. Your blog has been very helpful!

  7. LouWho says:

    Are you going to update this to reflect 3.0?

  8. Ramon Smits says:

    Great stuff! Would be nice if a chapter would be dedicated to x64/64 bit installers.

  9. Ran Davidovitz says:

    Alex this is a very good and large post, thanks for spending time on it!

  10. vinodk says:

    On adding the <Property Id="ALLUSERS">1</Property>, i can install the .msi to all users of the machine, but only thru Administrator account.

    But when i tried to install the same .msi with a non-admin user rights, i received an error saying "You do no have sufficient privileges, please logon as adminstrator and retry the installation".

    Can anyone help plz me to write a script, when i install the .msi from a non-admin user, i should not receive admin privileges error msg.

    Thanks in advance..


    Vinod K

  11. vinodk says:

    Hello everyone,

    When tried to run Wix v3 scripts i’ve received the following errors

    1. error LGHT0204 : ICE43: Co

    mponent C_Rel has non-advertised shortcuts. It should use a registry key under HKCU as its KeyPath, not a file.

    2. error LGHT0204 : ICE57: Co

    mponent ‘C_Rel’ has both per-user and per-machine data with a per-machine KeyPath.

    Can any one please help me in resolving the above things.

    Thanks in advance.


    Vinod K

  12. Alex Shevchuk says:

    You need to read Part 10-Shortcuts ( to understand the difference between advertised and non-advertised shortcuts.

  13. Abhishek says:

    Hi Alex,

    I created a wix file using the Major upgrade wix file sample described by you. It works great.

    The wix file I created is for a Visual studio package application.

    I am facing a problem in the upgrade scenario. When I install a new build of the msi, if Visual studio is running, I get a UI from the installer with two options

    1. Automatically close applications and attempt to restart them after setup is complete

    2. Do not close applicaiotns

    The check box is set for the first option.

    When I click OK. Visual studio crashes during closing and gives an option to debug or close.

    WHen I hit debug, there is a access violation exception in devenv.exe.

    Do you know why this is happening.

    Any help on this would be great.



  14. Alex Shevchuk says:

    Hi Abhishek,

    Sorry, I don’t know why Visual Studio crashes when Restart Manager is trying to shut it down.  You need to ask Visual Studio people why this is happening.

  15. Abhishek says:

    Thanks Alex for your response. I would like to know how I get this dialog automatically when I am performing an upgrade.

    1. Automatically close applications and attempt to restart them after setup is complete

    2. Do not close applicaiotns

    What part of wix code brings up that dialog. Is it an out of box feature.

  16. Alex Shevchuk says:

    Read about FilesInUse ( and MsiRMFilesInUse ( dialogs.  If you are using any flavor of Wix UI, you have them already. This topic ( has fairly good explanation on using RestartManager in Windows Installer.

  17. questsid says:


    How can I get the IP address and the port address of my system that should be dynamically generated in a text box using wix.Is there any way to get the address using any property or any env variable? please help


  18. Georgi Nastev says:

    Hi, could you provide such tutorial for installin COM objects? How to handle the restart PC, so that the setup continues afterward, from where it had stopped?

  19. questsid says:

    Hi Alec,

    Do you have the solution to remove the services on uninstallation of the installer.

  20. Joel Hess says:

    I’m trying to create a package that leaves no trace in the registry (see )

    How can I do this with WIX?

  21. Maria De Souza says:

    How to write a custom action to launch an exe when UAC is cancelled or timed-out during uninstall ?

    We are building an installer for our product using the WIX technology. We set InstallPrivileges to ‘elevated’ as we need to write to the HKLM hive etc.  

    The application has an exe that is launched after installation and runs on the system. For several reasons, it needs to be stopped before the ‘InstallInitialize’ begins (i.e. before the files and executable

    are removed).

    On Vista and Windows 7, we need to recover and launch the exe again if the user cancels the UAC prompt or it times-out and the application is not uninstalled.

    In the wxs file, we define a rollback action:

    <CustomAction Id="RestartApp" Execute="rollback" FileKey="myapp.exe" ExeCommand="" Return="ignore" />


    <Custom Action='RestartApp' After='InstallInitialize' >(REMOVE~="ALL" OR MaintenanceMode="Remove") AND Installed</Custom>


    However, this never gets called!

    How can I detect the UAC is cancelled and recover and launch the exe?

  22. Anonymous says:

    Rob Mensching's Blog…/posts Wix Edit on Sourceforge http://wixedit.sourceforge

  23. Shreedhar says:


    I'm using Wix 3.0 toolset to compile your sample code given in your tutorial. I'm getting some errors.

    Also I'm not able find the download of Wix 2.0. Do I've to strictly use Wix 2.0.



  24. Anonymous says:

    Here are some of the links that I tweeted during the past week: VSTO 4 ( 2010 ) Lessons Learned Christopher

  25. Jakob Justesen says:

    Thanks man!.

    These are really good and easy to understand.

    Best tutorial I have seen on WiX.

  26. Alex Shevchuk says:

    Thank you Jakob.

  27. says:

    Excellent, Thank you

  28. Brett Wertz says:

    Alex, thank you so much for this entire collection of articles!!  It has provided me with a lot of answers to questions I've had and has extended the depth of understanding that I wasn't able to get through the high level tutorial on the WiX site.  

Comments are closed.

Skip to main content