I am using the Wix Toolset to generate an .msi for my application. Everything works when I upgrade to a new version, except every time I run a newer version installation the setup doesn't detect already installed features and instead defaults to the features that are 'required' which means if the user installed any of the other features they are removed unless the user explicitly checks them for installation again.
Is there anyway to have the .msi detect which features are currently installed each time a newer version is installed?
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" UpgradeCode="9e578e3d-0119-425c-8633-f54ffaaa4929" Name="#product.name#" Version="#product.version#" Manufacturer="#product.company#" Language="1033">
<Package InstallerVersion="400" Compressed="yes" InstallScope="perMachine" Comments="#product.version#" Description="#product.description#"/>
<Media Id="1" Cabinet="myapp.cab" EmbedCab="yes" />
<!-- Installer Properties -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<PropertyRef Id="WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED"/>
<!-- Check Existing Install -->
<Upgrade Id="9e578e3d-0119-425c-8633-f54ffaaa4929">
<UpgradeVersion Minimum="#product.version#" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Minimum="0.0.0" Maximum="#product.version#" IncludeMinimum="yes" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED"/>
</Upgrade>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
<!-- Prerequisites -->
<Condition Message="This application requires .NET Framework 4.6 or newer. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED]]>
</Condition>
<Condition Message="This application is only supported on Windows 7, Windows Server 2008 R2 or higher.">
<![CDATA[Installed OR (VersionNT >= 601)]]>
</Condition>
...
<Feature Id="Feature_Application"
Title="Application"
ConfigurableDirectory="APPLICATIONDIR"
Level="1"
AllowAdvertise="no">
#product.applicationcomponents#
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="CleanupApplicationData" />
</Feature>
<!-- Feature: My Service -->
<Feature Id="Feature_Service"
Title="My Service"
Description="My Service"
ConfigurableDirectory="REPORTDIR"
Level="3"
AllowAdvertise="no">
#product.servicecomponents#
<ComponentRef Id="ServiceShortcut" />
<Component Id="MyServiceInstaller_ServiceControl" Guid="B72CAA3F-F2DB-48D2-90DD-061209AB2CE5" Directory="REPORTDIR">
<CreateFolder />
<File Id="MyService.exe" Name="MyService.exe" KeyPath="yes" Source="#product.sourcedir#\MyService\MyService.exe"/>
<ServiceInstall Id="MyServiceInstaller_ServiceInstall"
Type="ownProcess"
Vital="yes"
Name="Windows Service"
DisplayName="Windows Service"
Description="Windows service"
Start="auto"
Account="NT AUTHORITY\LocalService"
ErrorControl="ignore"
Interactive="no" />
<ServiceControl Id="MyServiceInstaller_ServiceInstall"
Name="My Service"
Stop="both"
Remove="uninstall"
Wait="yes" />
</Component>
</Feature>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate"/>
</InstallExecuteSequence>
<UIRef Id="WixUI_FeatureTree" />
<UI>
<DialogRef Id="FilesInUse" />
<DialogRef Id="MsiRMFilesInUse" />
<!-- Add the GUI logic for installation -->
</UI>
</Product>
#dpb's answer would solve the problem, because the MajorUpgrade tag has a MigrateFeatures attribute with an implicit default value of yes.
However, it is only relevant if you actually want to create a major update to your product, which has implications. - This is not an option for me.
If you do not want to perform a major update, you must add the MigrateFeatures attribute to the UpgradeVersion tag and explicitly set it's value to yes.
The MigrateFeatureStates action below the InstallExecuteSequence tag is of minor importance only.
This action will not be executed if there is no MigrateFeatures="yes" attribute (implicit or explicit), as described above.
If there is a MigrateFeatures="yes" attribute, the MigrateFeatureStates action will automatically be added to the InstallExecuteSequence table of the installer.
You only need to explicitly define the MigrateFeatureStates action in the InstallExecuteSequence tag, if you want to adjust the action's position in the execution sequence.
Try using MajorUpgrade tag.
`<MajorUpgrade DowngradeErrorMessage="Can’t downgrade." />`
https://stackoverflow.com/a/11028847/7165196
Related
I have the wix project installer.
I want to use the update new version of my product.
It works fine, but still shows me all dialogs and I need to enter params.(such as install path, user credential and other).
How can I skip all dialogs and using all of these params from older (prev) installer version.
<Product Id="*" Name="$(var.ProductName) $(var.ProductVersion)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine" Platform="x64" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" />
<MediaTemplate EmbedCab="yes" />
<Feature Id="ProductFeature" Title="COMPANY.Product.Installers.Server" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="ServerInstallerFiles" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" ></Property>
<UIRef Id="WixUI_MinimalCustom"/>
<InstallExecuteSequence>
<Custom Action="DoAfterInstallJobParams" Before="DoAfterInstallJob">Not Installed or REINSTALL</Custom>
<Custom Action="DoAfterInstallJob" After="InstallFiles">Not Installed or REINSTALL</Custom>
<Custom Action="DoBeforeUnstallJob" After="InstallInitialize">REMOVE="ALL"</Custom>
</InstallExecuteSequence>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="COMPANY" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<Property Id="DoBeforeUninstallJob" Value="[INSTALLFOLDER]" />
<Binary Id="CustomActionBinary" SourceFile="$(var.SolutionDir)Output\Installers\Actions\COMPANY.Product.Installers.Server.Actions.CA.dll" />
<CustomAction Id="DoAfterInstallJob" BinaryKey="CustomActionBinary" DllEntry="AfterInstall" Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id="DoAfterInstallJobParams" Property="DoAfterInstallJob" Value="HOSTING_URL=[HOSTING_URL];DB_CONNECTION=[DB_CONNECTION];INSTALLPATH=[INSTALLFOLDER];LOGIN=[LOGIN];PASSWORD=[PASSWORD]" />
<CustomAction Id="DoBeforeUnstallJob" BinaryKey="CustomActionBinary" DllEntry="BeforeUninstall" Execute="deferred" Return="check" Impersonate="no" />
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<ComponentRef Id="cmpServerHost"/>
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="INSTALLFOLDER">
<Directory Id="ServerHost" Name="ServerHost">
<Component Win64="yes" Id="cmpServerHost" Guid="a4a81104-1e30-463d-87e1-e8a79b4c6829">
<File Id="ServerLog4netConfig" Source="$(var.SolutionDir)..\Logging\log4net.config" />
<RegistryValue Root="HKLM" Key="Software\[Manufacturer]\$(var.ProductName)" Type="string" Value="[INSTALLFOLDER]" KeyPath="yes" Name="COMPANYInstallPath"/>
<File Id="AppVersion" Source="$(var.SolutionDir)Output\Installers\Actions\COMPANY.Product.Installers.Server.Actions.CA.dll" />
</Component>
</Directory>
</DirectoryRef>
</Fragment>
Windows Installer does not persist properties. You have to do it yourself. Here is an example.
http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/
Remember Properties: Persisting properties allows you to read back the settings from the first version.
Dialog Control & Order: In order to skip dialogs you need to detect whether a major upgrade is taking place, if you use major
upgrades (which you do based on that source file), and then control
the dialog flow accordingly using conditioning and property values. This requires quite a bit of work and
testing. I would avoid it if you can.
Easy Mode: Just disabling (write protect) or hiding the dialogs fields that contain settings written in the first setup might be
preferable (rather than changing the dialog sequence). You can use conditions and conditioning for both purposes.
Maintenance GUI: For minor upgrades, repair and uninstall the dialog set will be different from the original installation. You will get a "maintenance dialog set" presented rather than the "installation dialog set".
Major Upgrade: A pecularity occurs when you install upgrades via Windows Installer's major upgrade mechanism. Because of how this works technically you get the installation dialog set for the new version as well. This is because it is technically a fresh install of that new product code. The fact that the older version gets uninstalled as part of the process is besides the point. You are not installing a new minor version, you are uninstalling and reinstalling effectively.
WIX_UPGRADE_DETECTED: There is a property that is set in a standard WiX package. It is WIX_UPGRADE_DETECTED. It can be used to detect when a major upgrade is taking place and hence used in conditions to adjust the dialog order of a major upgrade installation. Here are more details on this property, along with description of UPGRADINGPRODUCTCODE - which is another property that is set in the setup being uninstalled (not in the new one being installed).
Here is a quick list of different ways to change WiX GUI.
Wix, custom dialog when previous version exists (customize dialogs when previous version exists).
Ran out of time. Persisting this, will update later.
Some Links:
Removing Default dialogs from MSI
My multi instance msi setup work only if I use the same msi file. Then the user
can change the directory
install a new instance if it a new directory
update the instance if it an existing directory
every instance has its own uninstaller entry
If I use a new build of the setup and run an update then
a second uninstaller with the same display name is registered
A second of the new setup start in the maintenance mode. There is no
directory selection possible. An update of the other instances is
not possible.
After reading follow blog entry
http://blogs.msdn.com/b/pusu/archive/2009/06/10/understanding-msi.aspx
I have hard codes the PackageCode, ProductCode (per instance) and
UpgradeCode. And it work like expected. But I receive a big warning on
building. Can I ignore this? Is this the right solution?
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Language="1033" Manufacturer="i-net software GmbH" Name="i-net Test"
UpgradeCode="02c7fa01-5143-38ed-b923-2c2aaff301ae" Version="8.0.0.507">
<Package Comments="i-net Test Server" Compressed="yes" Id="c748d2f0-9ca5-3cbc-be9a-730c6d621f00"
InstallScope="perUser" />
<Media Cabinet="media1.cab" EmbedCab="yes" Id="1" />
<InstanceTransforms Property="INSTANCE_ID">
<Instance Id="Instance_0" ProductCode="c748d2f0-9ca5-3cbc-be9a-730c6d621f00" UpgradeCode="c748d2f0-9ca5-3cbc-be9a-730c6d621ff3" />
<Instance Id="Instance_1" ProductCode="c748d2f0-9ca5-3cbc-be9a-730c6d621f01" UpgradeCode="4c8e1670-9d04-3dce-b88a-1a4dbbbc976d" />
<Instance Id="Instance_2" ProductCode="c748d2f0-9ca5-3cbc-be9a-730c6d621f02" UpgradeCode="b76f160d-9395-3eda-a13d-d0566379ca8f" />
</InstanceTransforms>
<MajorUpgrade AllowDowngrades="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="i-net Test" />
</Directory>
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Directory Id="Server" Name="Server">
<Component Guid="d62d7bcb-9242-39da-a43a-015df0f965af" Id="Server_Comp" MultiInstance="yes">
<CreateFolder />
<File Id="Server_testBuilds.jar" Name="testBuilds.jar" Source="..\testBuilds.jar" />
</Component>
</Directory>
<Component Guid="1543477d-59fc-3ec3-bb67-a541abd9cfba" Id="instance_path" MultiInstance="yes">
<RegistryKey ForceDeleteOnUninstall="yes" Id="instance_path_reg"
Key="Software\i-net software GmbH\i-net Test\Instances\[INSTANCE_NUMBER]" Root="HKLM">
<RegistryValue Type="string" Value="[INSTALLDIR]" />
</RegistryKey>
</Component>
</DirectoryRef>
<Property Id="INSTANCE_ID" Value="NotSet" />
<Property Id="InstancesCount" Value="3" />
<CustomAction Id="SetInstanceID" Script="vbscript">...</CustomAction>
<InstallUISequence>
<Custom Action="SetInstanceID" Before="ExecuteAction" />
<Custom Action="SetTransforms" After="SetInstanceID">ACTION = "INSTALL"</Custom>
</InstallUISequence>
<InstallExecuteSequence>
<Custom Action="SetInstanceID" Before="ValidateProductID" />
<Custom Action="SetProductName" After="SetInstanceID">PRODUCT_NAME</Custom>
</InstallExecuteSequence>
<CustomAction Id="SetTransforms" Property="TRANSFORMS" Value="{:[INSTANCE_ID];}[TRANSFORMS]" />
<CustomAction Id="SetProductName" Property="ProductName" Value="[PRODUCT_NAME]" />
<Feature Id="MainApplication">
<ComponentRef Id="Server_Comp" />
<ComponentRef Id="instance_path" />
</Feature>
</Product>
</Wix>
The SetInstanceID action can you find at https://github.com/i-net-software/SetupBuilder/blob/master/src/com/inet/gradle/setup/msi/MultiInstance.vbs
Before I have use "*" for the ProductCode (global and per instance) and
have hard coded only the UpgradeCode (global and per instance).
The solution was wrong. The PackageCode and ProductCode must be change for every build. Else the update does not work right. This is valid for a single instance but also for multiple instances msi files.
The problem with multiple instances is that the MajorUpgrade element does not work with multiple instances. If you inspect the resulting msi file with Orca you see only one entry with the UpgradeCode from the Product Element. The UpgradeCodes from your instances are not listen in this table. To solve this you must add the UpgradeCodes manually to this table:
<Property Id="InstancesCount" Value="3"/>
<InstanceTransforms Property="INSTANCE_ID">
<Instance Id="Instance_0" ProductCode="*" UpgradeCode="GUID_0"/>
<Instance Id="Instance_1" ProductCode="*" UpgradeCode="GUID_1"/>
<Instance Id="Instance_2" ProductCode="*" UpgradeCode="GUID_2"/>
</InstanceTransforms>
<Upgrade Id="GUID_0">
<UpgradeVersion MigrateFeatures="yes" Minimum="0.0.0.0" Property="WIX_UPGRADE_DETECTED_0"/>
</Upgrade>
<Upgrade Id="GUID_1">
<UpgradeVersion MigrateFeatures="yes" Minimum="0.0.0.0" Property="WIX_UPGRADE_DETECTED_1"/>
</Upgrade>
<Upgrade Id="GUID_2">
<UpgradeVersion MigrateFeatures="yes" Minimum="0.0.0.0" Property="WIX_UPGRADE_DETECTED_2"/>
</Upgrade>
If you have remove the MajorUpgrade element then you must also add:
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallValidate"/>
</InstallExecuteSequence>
This can only add once and will be automatically added form MajorUpgrade. The default property name in the update table is WIX_UPGRADE_DETECTED. We need to use an individual name for every instance. I have suffix it with "_". But also every other is possible.
If we look into the update table with Orca we can see all our Update codes now. But there is a new problem. If we install the second instance then MSIEXEC find an installation of one of this UpgradeCodes in the action FindRelatedProducts and uninstall it in the RemoveExistingProducts. We can install only one instance. All previous instances are removed.
Between the actions FindRelatedProducts and RemoveExistingProducts we need to clear the WIX_UPGRADE_DETECTED_xx properties of the other instances. Only the UpdateCode of the current instance must exists. I have do this with a small vbscript action:
<CustomAction Id="SetInstanceID" Script="vbscript">
InstancesCount = Session.Property( "InstancesCount" )
For i = 0 To InstancesCount - 1
If CStr(i) <> instanceNumber Then
Session.Property( "WIX_UPGRADE_DETECTED_" & i ) = ""
End If
Next
</CustomAction>
Now only the the current instance is removed in RemoveExistingProducts if already exists.
Actually, the MajorUpgrade element does work with multiple instances. The generated instance transforms replace all rows of the upgrade table with new rows that are identical except for the UpgradeCode, which is replaced by that instance's own UpgradeCode. If you extract the instance transforms from your MSI (use the MsiDb.exe tool from the SDK to extract the substorages, which are named the same as the Instance/#Id values, in order to see them in action by applying them to the MSI in Orca).
I have an application that needs 1. to create DLL files in a Program Files subfolder (e.g. C:\Program Files (x86)\myapp), and 2. to create a registry entry in HKCU. When I run the Remove, I need this subfolder and its files to be deleted, as well as the registry entry.
When I run the installation file of a newer version, I need the new DLL files to replace the existing ones.
I've been struggling getting it to work, having tried several tips from various threads and sites.
So far I get the Program Files to be removed but not the Registry. And I cannot get the file upgrade to work (I change the UpgradeCode & ProductVersion for each new release)
Here is an extract of what I have
<Product Id="$(var.ProductID)"
Name="myapp"
Language="1033"
Version="$(var.ProductVersion)"
UpgradeCode="$(var.UpgradeCode)"
Manufacturer="$(var.Manufacturer)">
<Package Description="Windows installer for myApp $(var.ProductVersion)"
Comments="Execute to install myApp $(var.ProductVersion)"
InstallerVersion="200"
Compressed="yes" />
<Media Id="1" Cabinet="contents.cab" EmbedCab="yes" CompressionLevel="high"/>
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion Minimum="$(var.ProductVersion)"
OnlyDetect="yes"
Property="NEWERVERSIONDETECTED" />
<UpgradeVersion Minimum="1.0.0.0"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
IncludeMaximum="no"
Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>
<CustomAction Id="UIandAdvertised" Error="Something about the UI."/>
<Directory Id="TARGETDIR" Name="SourceDir"/>
<Feature Id="Complete"
Title="myApp"
Description="Installation of myApp $(var.ProductVersion)"
Level="1">
<ComponentRef Id="myAppFiles"/>
<ComponentRef Id="RegistryEntry"/>
</Feature>
<Property Id="WIXUI_INSTALLDIR">INSTALLDIR</Property>
<UIRef Id="WixUI_InstallDir"/>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
<RemoveRegistryValues />
</InstallExecuteSequence>
</Product>
My files and reg infos are maintained in a separate file:
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="INSTALLDIR" Name="myapp">
<Component Id="myAppFiles" Guid="{xxxx-xxxx-xxxx-xxxx-xxxxxxxx}">
<File Id="myapp.dll" Name="myapp.dll" KeyPath="yes" Source="..\src\bin\x86\Release\myapp.dll" />
</Component>
<Component Id="RegistryEntry" Guid="{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx}" Win64="no" >
<RegistryKey Root="HKCU" Key="Software\myapp" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="myapp" />
</RegistryKey>
</Component>
</Directory>
</Directory>
</DirectoryRef>
Any help will be highly appreciated.
Use Product ID ="*",
It changes product id guid for each build.
But keep upgrade code same for product, unless you dont want to support upgrade.
You can use major upgrade tag instead of Upgrade tag. It is easier to use.
<MajorUpgrade AllowDowngrades="no"
AllowSameVersionUpgrades="no"
Schedule="afterInstallValidate"
DowngradeErrorMessage="Newer version of [ProductName] is already installed."/>
I have a Wix Setup of my .Net appplication.I have installed it on my system.
I want to create a WIX setup with UpgradeVesion to remove some feaures from the installed setup and add new features.
i use the below code:-
<Product Id="*"
Name="MyProduct"
Language="10313"
Version="3.0.0.0"
Manufacturer="My_Company"
UpgradeCode="6ba277d97-41de-4371-a236-b757b7840f7b">
<Package InstallerVersion="200" Compressed="yes" />
<Upgrade Id="6ba28d97-49de-4371-a236-b757b7840f7b">
<UpgradeVersion Minimum="0.0.0.0"
IncludeMinimum="yes"
OnlyDetect="no"
Maximum="3.0.0.0"
IncludeMaximum="yes"
Property="PREVIOUSFOUND" RemoveFeatures="[ProductFeature1]"/>
</Upgrade>
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize"/>
</InstallExecuteSequence>
<MediaTemplate />
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
<Feature Id="ProductFeature" Title="TestApp" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Feature Id="ProductFeature1" Title="TestApp" Level="1">
<ComponentGroupRef Id="ProductComponent1"/>
</Feature>
</Product>
But i am unable to remove the ProductFeature1.
How can i remove an existing feature from the installed setup.
You need to create Major upgrade for wix to achieve the same..
follow the below link:-
enter link description here
When using Visual Studio Setup project, if an installation fails, it will revert back to the previous version of the installation, so it restored the previous files.
But, when using WiX installer, if the installation fails, WiX installer removed all the files on the installed folder.
How can I make WiX installer restore the previous files when the installation fails ?
Thank you.
This is in Product.wxs of a Wix installer for a Windows Service:
<Product Id="*" Name="WixWindowsService2012" Language="1033" Version="1.0.0.1" Manufacturer="aaa" UpgradeCode="blabla">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platforms="x64"/>
<Upgrade Id="blabla">
<UpgradeVersion OnlyDetect="no" Property="PREVIOUSFOUND"
Minimum="1.0.0.0" IncludeMinimum="yes"
Maximum="99.0.0.0" IncludeMaximum="no" />
</Upgrade>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="WixWindowsService2012" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
:
<Component Id="ProductComponent" Win64="yes">
<File Id="WixWindowsService2012.exe" Name="WixWindowsService2012.exe" Source="$(var.WixWindowsService2012.TargetPath)" Vital="yes" KeyPath="yes" DiskId="1"/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="WixWindowsService2012"
DisplayName="WixWindowsService2012"
Description="A test for WiX installation for Windows Service"
Start="auto"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no"></ServiceInstall>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="WixWindowsService2012" Wait="yes" />
</Component>
If you had a setup that restored previous versions of the files then by definition it was an upgrade (RemovePreviousVersions in Visual Studio). In WiX you specify an upgrade by using the MajorUpgrade element, so whatever you have in yours isn't sufficient or isn't working. Your UpgradeCode in the WiX project needs to be the same as your previous setup, whether it's WiX or VS. The ProductVersion must be incremented in the first 3 digits, and the ProductCode must be different. In addition, a per-machine install will not upgrade a per user install, just in case that's happening. Creating a verbose log of the install will supply the reason why your upgrade isn't working.