here is the whole code : <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension" xmlns:util='http://schemas.microsoft.com/wix/UtilExtension' xmlns:sql='http://schemas.microsoft.com/wix/SqlExtension' xmlns:iis='http://schemas.microsoft.com/wix/IIsExtension'> <?define version = "1.0.3.0" ?> <Product Id="myGUID" Name="MyProduct" Language="1033" Version="$(var.version)" Manufacturer="MyCompany" UpgradeCode="myGUID"> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<!-- Check to see if .Net Framework 4 client profile is installed. It it's not, error out. --> <PropertyRef Id="NETFRAMEWORK40CLIENT" /> <Condition Message='This setup requires the .NET Framework 4.0 Client Profile installed.'> <![CDATA[Installed OR NETFRAMEWORK40CLIENT]]> </Condition> <!-- Check to see if IIS is installed. It it's not, error out. --> <Property Id="IIS_MAJOR_VERSION"> <RegistrySearch Id="CheckIISVersion" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp" Name="MajorVersion" Type="raw"/> </Property> <Condition Message="IIS must be installed of at least IIS 6 or higher."> <![CDATA[Installed OR (IIS_MAJOR_VERSION >= "#6")]]> </Condition> <!-- Holds the app pool for the web application--> <Property Id='APP_POOL_NAME' Value='MyProductAppPool'/> <!--<MajorUpgrade DowngradeErrorMessage="A newer version of MyProduct website is already installed." RemoveFeatures="all" Schedule="afterInstallValidate" />--> <!-- Describe the media source --> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <Feature Id="ProductFeature" Title="MyProduct Product" Level="1"> <ComponentGroupRef Id="WebsiteFiles"/> <ComponentRef Id="SqlComponent"/> </Feature> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" /> <UI> <UIRef Id="WixUI_SimpleWebAppInstall" /> <UIRef Id="WixUI_ErrorProgressText" /> </UI> <!-- adding Add/Remove programs entry --> <Property Id="ARPPRODUCTICON" Secure="yes" /> <Property Id="ARPNOMODIFY" Value="1"/> <Property Id="ARPNOREPAIR" Value="1"/> <!-- upgrade table --> <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" /> <Upgrade Id="myGUID"> <UpgradeVersion IgnoreRemoveFailure ="no" Property="OLDERVERSIONBEINGUPGRADED" Minimum="1.0.0.0" IncludeMinimum="yes" Maximum="$(var.version)" IncludeMaximum="no" OnlyDetect="no" /> <UpgradeVersion Minimum="$(var.version)" IncludeMinimum="no" OnlyDetect="yes" Language="1033" Property="NEWERVERSIONDETECTED" /> <!--<UpgradeVersion Property="PREVIOUSFOUND" Minimum="1.0.1.0" IncludeMinimum="yes" Maximum="$(var.version)" IncludeMaximum="no" OnlyDetect="no" />--> </Upgrade> <!--to remove previous versions before install--> <InstallExecuteSequence> <RemoveExistingProducts After="InstallValidate" /> </InstallExecuteSequence> </Product> <Fragment> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="MyProduct" > <Directory Id="Engine" Name="MyProductEngine"> <Component Id="ProductComponent" Feature="ProductFeature" Guid="A1E0C501-3B3B-4D61-AA62-3D0B7F4B2369" KeyPath="yes"> <File Id="MyProductEngineFiles" Name="$(var.MyProduct.Engine.TargetFileName)" Source="$(var.MyProduct.Engine.TargetPath)" DiskId="1" /> <CreateFolder/> </Component> </Directory> <Directory Id="Website" Name="MyProductWebsite"> <Component Id="WebsiteComponents" Feature="ProductFeature" Guid="007593CC-9F1D-4E04-BE14-203E82F5D09F" KeyPath="yes"> <iis:WebVirtualDir Id="VDir" Alias="[WEB_APP_NAME]" Directory="Website" WebSite="TheWebSite" > <!-- Turn the Virtual Directory into a web application. --> <iis:WebApplication Id="TestWebApplication" Name="MyProduct" WebAppPool="TheAppPool"/> </iis:WebVirtualDir> <CreateFolder/> <iis:WebAppPool Id="TheAppPool" Name="[APP_POOL_NAME]" ManagedRuntimeVersion="4" ManagedPipelineMode="Integrated" /> </Component> </Directory> </Directory> </Directory> </Directory> </Fragment> <Fragment> <iis:WebSite Id='TheWebSite' Description='[WEBSITE_NAME]' Directory='Website'> <!-- This element has to be here or WiX does not compile. It's ignored in this case. --> <iis:WebAddress Id="AllUnassigned" Port="80"/> </iis:WebSite> </Fragment> <Fragment> <util:User Id="SQLUser" Name="[SQLUSER]" Password="[SQLPASSWORD]" ></util:User> <Component Id="SqlComponent" Guid="3DF35F73-0025-4395-AA8C-95E856FA76FB" Directory="Website"> <sql:SqlDatabase Id="SqlDatabase" Database="[DATABASENAME]" User="SQLUser" Server="[SQLSERVER]" CreateOnInstall="yes" DropOnUninstall="yes" ContinueOnError="yes"> <sql:SqlScript Id="CreateDbScript" BinaryKey="CreateDb" ExecuteOnInstall="yes" User="SQLUser" /> </sql:SqlDatabase> <CreateFolder/> </Component> <!-- db script here --> <Binary Id="CreateDb" SourceFile="CreateTable.sql" /> </Fragment> </Wix> On Fri, Feb 10, 2012 at 3:01 PM, Pally Sandher <pally.sand...@iesve.com>wrote: > Paste your Product Element too as all that code depends on the Product > being set up correctly. > > Palbinder Sandher > Software Platform Engineer > T: +44 (0) 141 945 8500 > F: +44 (0) 141 945 8501 > http://www.iesve.com > > **Design, Simulate + Innovate with the <Virtual Environment>** > Integrated Environmental Solutions Limited. Registered in Scotland No. > SC151456 > Registered Office - Helix Building, West Of Scotland Science Park, Glasgow > G20 0SP > Email Disclaimer > > > > -----Original Message----- > From: Mena Samy [mailto:mena.s...@gmail.com] > Sent: 10 February 2012 11:29 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] installer don't upgrade > > here is my code : > > <!-- upgrade table --> > <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" /> > <Upgrade Id="5eb98548-2b78-429c-99c3-0b48150ced37"> > <UpgradeVersion IgnoreRemoveFailure ="no" > Property="OLDERVERSIONBEINGUPGRADED" > Minimum="1.0.0.0" IncludeMinimum="yes" > Maximum="$(var.version)" IncludeMaximum="no" > OnlyDetect="no" /> > > <UpgradeVersion Minimum="$(var.version)" IncludeMinimum="no" > OnlyDetect="yes" Language="1033" Property="NEWERVERSIONDETECTED" /> > <!--<UpgradeVersion Property="PREVIOUSFOUND" > Minimum="1.0.1.0" IncludeMinimum="yes" > Maximum="$(var.version)" IncludeMaximum="no" > OnlyDetect="no" />--> > > </Upgrade> > <!--to remove previous versions before install--> > <InstallExecuteSequence> > <RemoveExistingProducts Before="InstallValidate" /> > </InstallExecuteSequence> > > any help. > > Thanks, > Mena S. Beshay > Software Developer , Smart Valley > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > -- Thanks, Mena S. Beshay Software Developer , Smart Valley ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users