Thomas,

I'm not sure if there is an easier way, but as you (presumably) know the GUID of your application, you could try the following.  I haven't tried it myself, but I think it should work:

Add a search to your script to check the registry for HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\<your app guid>\UninstallString

If you find a value here, you can run a Custom Action (type 50) to excecute the uininstall for the existing installation.  You will need to set the the Sequence on the action really low so it happens before the rest of the install.  

HTH,

Bill









From "Thomas Schroedter" <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]

04/05/2006 03:28


To
<nant-users@lists.sourceforge.net>
cc
Subject
[NAnt-users] <msi> task: How to remove an existing installation before installing a new version?






Hi,

I need a bit of help with the msi task. I've no problem to create a setup, it's working fine. Now, I've got a problem with updating the installation. What I want to do is install V1.0.0, create a new V1.0.1 and when the user runs the setup for V1.0.1 on a machine, which already got V1.0.0 installed, uninstall the old version and then install the new one. How can I do it inside the NAnt <msi> task?

Thanks,
Thomas

****** IMPORTANT ******
This email and any attachments transmitted with it are confidential. If you are not the intended recipient or person responsible for delivering the email to the intended recipient, you are prohibited from disclosing, copying or using the information contained in it. If you have received this email in error, contact us by replying to this email and delete all copies of the message and attachments from your system.
Before opening or using attachments, check them for viruses and defects. We accept no responsibility for any damage caused by any computer viruses or other defects or conditions which may damage or interfere with data, hardware or software with which it might be used. This email and any attachment may have been modified or otherwise interfered with in the course of its transmission. We give no warranty that the integrity of this email has been maintained.
Fiducian Portfolio Services Limited ABN 13 073 845 931 AFS Licence 231101. Email: [EMAIL PROTECTED]


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.


*For security and training purposes, telephone calls may be recorded and monitored.

Reply via email to