All,

I've written a very simple Wix Script to install an exe (notepad in this
case) and a signed .Net dll to the GAC.  This seems to work just fine.
However I want to test an upgrade.  I would like the previous version to be
uninstalled and then the new version installed.  I don't watch to patch
because I don't want to keep track of what changes occur in the MSI.  So the
safest thing for me to do is a complete re-install.

 To do this I change the version number from 1.0 to 1.1 and the upgrade
version from 1.0 to 1.1 in the script below, I then compile the script and
run it.  My assembly MyCommon.dll is then removed from the GAC???  I've read
that I need to increment the assembly version number etc, but in a larger
script one of my dll's may not change but I would still like to have it
re-deployed.

What am I doing wrong?  I've even tried changing the sequence to move
RemoveExistingProducts to an earlier place.  This works but I don't think
it's the correct thing to do as Orca moans about it...

Do I need to use the REINSTALL=ALL switch? if so why?  


<?xml version="1.0" encoding="windows-1252"?>

<Wix xmlns=" <http://schemas.microsoft.com/wix/2003/01/wi>
http://schemas.microsoft.com/wix/2003/01/wi";>

 <Product Name="Sample Application" 
   Id="????????-????-????-????-????????????"    
          Language="1033" 
          Codepage="1252" 
          Version="1.0" 
          Manufacturer="ACME" 
          UpgradeCode="74b8b879-c395-423b-a289-b1e369837f1d" >
          
  <Package Id="????????-????-????-????-????????????" 
                 Keywords="Installer" 
                 Description="Sample Application" 
                 Manufacturer="ACME." 
                 InstallerVersion="200"
                 Languages="2057" 
                 Compressed="yes" 
                 SummaryCodepage="1252"/>
             
  <Media Id="1" Cabinet="Sample.cab" EmbedCab="yes"/>
  
  <Upgrade Id="74b8b879-c395-423b-a289-b1e369837f1d">
   <UpgradeVersion OnlyDetect="yes" Property="NEWERPRODUCTFOUND"
Minimum="1.0" IncludeMinimum="no" />
   <Property Id="NEWERPRODUCTFOUND" Secure="yes" />
   <UpgradeVersion OnlyDetect="no" Property="PREVIOUSVERSIONSINSTALLED"
IncludeMaximum="no" Maximum="1.0" />
   <Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
  </Upgrade>
  
  <CustomAction Id='NoDowngrade' Error='A later version of Sample is already
installed.' />
  
  <Directory Id="TARGETDIR" Name="SourceDir">
   <Directory Id="ProgramFilesFolder" Name="PFiles">
    <Directory Id="Sample" Name="Samp">
     <Directory Id="INSTALLDIR" Name="Test">
      <Component Id="Sample.Component"
Guid="56fba829-1f49-4fa5-a4bd-6f136d38eed9" DiskId="1">
       <File Id="Sample.File" Name="Notepad.exe" LongName="Notepad.exe"
src="Notepad2.exe" KeyPath="yes"/>
      </Component>
      <Component Id="Common.Component"
Guid="9063055d-ead2-4310-8fc5-f5cfc64cd4c7" DiskId="1">
       <File Id="Common.File" Name="MyCom.dll" Assembly=".net"
LongName="MyCommon.dll" src="MyCommon.dll" KeyPath="yes"/>
      </Component>
     </Directory>
    </Directory>
   </Directory>
  </Directory>
  <Feature Id="Complete" 
     Title="Sample" 
     Description="Complete" 
     TypicalDefault="install" 
     Display="expand" 
     Level="1" 
     ConfigurableDirectory="INSTALLDIR">
   <ComponentRef Id="Sample.Component"/>
   <ComponentRef Id="Common.Component"/>
  </Feature>

  <InstallExecuteSequence>
   <Custom Action='NoDowngrade'
After='FindRelatedProducts'>NEWERPRODUCTFOUND</Custom>
   <RemoveExistingProducts After="InstallInitialize" />
  </InstallExecuteSequence>
 
 </Product>
</Wix>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to