Thomas,

Removing the old version is important if the new version is structurally 
different (eg different assembly names, different registry keys, different 
folder layout).  Believe me it happens.

To just go over the top look at Minor Upgrades, these work if you are simply 
refreshing existing files.   

However, minor upgrades have a different problem, you can only execute them 
with a bootstrapper, or command line, you can't just click on them.



-----Original Message-----
From: Thomas Due [mailto:thomas....@scanvaegt.dk] 
Sent: Wednesday, 4 February 2009 4:57 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] auto delete on reinstall

Related question: Why should the old version even have to be uninstalled first? 
Shouldn't it be enough to just install on top of the old version? 

If so, how would one do that? 

/Thomas Due

-----Original Message-----
From: Chad Petersen [mailto:chad.peter...@harlandfs.com]
Sent: 3. februar 2009 17:49
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] auto delete on reinstall

I believe you need to change your Product Id="" to use a different GUID than 
your previous package and also change the version. You might also need to add a 
Package Id="????????-????-????-????-????????????", but not sure it is required 
to remove the previous package.

HTH

-----Original Message-----
From: Thomas Guettler [mailto:h...@tbz-pariv.de]
Sent: Friday, January 30, 2009 6:23 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] auto delete on reinstall

Hi,

thank you for this hint. I found more information now after searching for 
"Major Upgrade".
But somehow I couldn't find a working example.

Here is my xml file:

<?xml version='1.0'?>
<!--
 $Id: tbzmodwincontrol.wxs 9 2009-01-30 11:29:29Z tguettler $
 $HeadURL:
svn+ssh://svnserver/svn/modwincontrol/trunk/ms-windows/tbzmodwincontrol.
svn+wxs
$
-->
 
<?define Version = "1.0.78" ?> <!-- Variable muss immer erhöht werden. -->
 
<?define UpgradeCode = "5B3289E7-EEFC-42BF-BC67-6B355C416290" ?> <!-- Variable 
bleibt konstant -->
 
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
 
<Product Id='94132004-8EB3-4606-AA2E-9D58D2A5BE4A'
           Name='TBZ-PARIV ModWinControl $(var.Version)'
           Version='$(var.Version)'
           Manufacturer='TBZ-PARIV'
           Language='1033'
           UpgradeCode='$(var.UpgradeCode)'>
    <Package Description='TBZ-PARIV ModwinControl for Windows'
Compressed='yes'/>
    <Property Id='ALLUSERS' Value='1' />
 
    <!--
http://neilsleightholm.blogspot.com/2009/01/wix-script-for-major-upgrades.html
-->
    <Property Id="UPGRADEFOUND" Secure="yes" /> 
    <Property Id="NEWPRODUCTFOUND" Secure="yes" /> 
 
    <Upgrade Id="$(var.UpgradeCode)">
     <UpgradeVersion Minimum="$(var.Version)" 
                     IncludeMinimum="no" 
                     OnlyDetect="yes" 
                     Property="NEWPRODUCTFOUND" /> 
 
     <UpgradeVersion Minimum="0.0.0" Maximum="$(var.Version)" 
                     IncludeMinimum="yes" IncludeMaximum="no" 
                     Property="UPGRADEFOUND" />
     </Upgrade>
     <CustomAction Id="PreventDowngrading" Error="Newer version already 
installed." />
     <InstallExecuteSequence>
      <FindRelatedProducts Before="LaunchConditions" />
      <RemoveExistingProducts After="InstallValidate" />
      <Custom Action="PreventDowngrading"
After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
     </InstallExecuteSequence>
     <InstallUISequence>
      <Custom Action="PreventDowngrading"
After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
     </InstallUISequence>
 
    <Media Id='1' EmbedCab='yes' Cabinet='tbzmwc.cab'/>
      <!-- Die cab-Datei wird in die msi-Datei eingebunden, so dass nur eine 
Datei benötigt wird. -->
 
    <Directory Id="TARGETDIR" Name="SourceDir">
     <Directory Id="ProgramFilesFolder">
      <Directory Id="APPLICATIONROOTDIRECTORY" Name="TBZ-PARIV ModWinControl">
       <Component Id="tbzmodwincontrol" Guid="*">
        <File Id="tbzmodwincontrol.exe"
Source="dist\tbzmodwincontrol.exe" KeyPath="yes"/>
 
       </Component>
      </Directory>
     </Directory>
    </Directory>
 
 
    <Feature Id="MainApplication" Title="TBZPARIV MODWINCONTROL" Level="1">
     <ComponentRef Id="tbzmodwincontrol" />
    </Feature>
 
 </Product>
</Wix>


Rob Mensching schrieb:
> Yeah sure.  Check out Major Upgrade.
>
>
> Hi,
>
> if I try to install a new version of my msi file, I get the error 
> message, that I need to uninstall it first.
>
> Is there a way to automatically uninstall it? Is possible to enable a 
> switch in the wix file that says "delete old version on install"?
>
> The next best solution would be an option if you start the 
> installation from the shell.
>
>   Thomas
> istinfo/wix-users
>   


--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users





------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to