In WiX v3.5, MajorUpgrade element provides nice "syntactic sugar".
Otherwise, you want to look at the Upgrade element.

On Thu, Feb 24, 2011 at 10:22 AM, Kevin Burton <kev...@buyseasons.com>wrote:

> I know this is an old question but I don't know the WiX syntax  for
> automatically uninstalling an installed product. I looked at the
> documentation and I got confused with Major/Minor updates/upgrades. In my
> case if the product is install I *always* want to uninstall it before
> proceeding with the installation. Any hints?
>
> Kevin Burton
> Senior Software Engineer
> BUYSEASONS
> 262-901-2000 Office
> 262-901-2312 Fax
> kev...@buyseasons.com
>
> -----Original Message-----
> From: David Watson [mailto:dwat...@sdl.com]
> Sent: Wednesday, February 23, 2011 11:28 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Command line installation?
>
> Hi,
> To set a property from the command line you simply just set the property to
> be equal to the required value.
>
> e.g.
> Msiexec /i installer.msi FULLYQUALIFIEDCOMPUTERNAME=
> Kevinspc.buyseasons.com
> SERVICEUSER=bob etc.
>
> Remember to make all your properties public my making them all CAPS to and
> you may need to set them to be secure, set any password properties to hidden
> to remove them from logs.
>
> You should be able to <condition> the display of your dialogue based on the
> properties that you have stated but it is also possible to run the msi
> without any ui at all by altering the command line with /qn.
>
> dave
>
> -----Original Message-----
> From: Kevin Burton [mailto:kev...@buyseasons.com]
> Sent: 23 February 2011 15:08
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] Command line installation?
>
> I would like to know what strategies are best to use if I optionally don't
> want a UI. Right now I have a custom dialog that appears and it sets a
> number of properties. If any of these properties are set on the command line
> I would like to skip the dialog. That is one question. The second question
> is how do I set the properties on the command line?
>
> If it helps the dialog is defined as
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>        <Fragment>
>    <UI>
>      <Property Id="FULLYQUALIFIEDCOMPUTERNAME"
> Hidden="yes">devbrain03</Property>
>      <Property Id="SERVICEUSER" Hidden="yes">user</Property>
>      <Property Id="SERVICEPASSWORD" Hidden="yes">testing</Property>
>      <Property Id="SQLSERVER" Hidden="yes">computer</Property>
>      <Property Id="TRANSACTIONSSQLSERVER" Hidden="yes">computer</Property>
>      <Property Id="REPLICATEDTRANSACTIONSERVER"
> Hidden="yes">computer</Property>
>      <Property Id="INVENTORYSERVER" Hidden="yes">computer</Property>
>      <Property Id="SHIPPINGSERVER" Hidden="yes">computer</Property>
>      <Property Id="COMMERCESERVERSITENAME" Hidden="yes">site</Property>
>      <Property Id="SMTPSERVERNAME" Hidden="yes">mail.company.com
> </Property>
>      <Property Id="LYRISSQLSERVER" Hidden="yes">server</Property>
>      <Property Id="LYRISUSER" Hidden="yes">user</Property>
>      <Property Id="LYRISPASSWORD" Hidden="yes">testing</Property>
>      <Property Id="CYBERSOURCEURL" Hidden="yes">https://myco.ic3.com/
> </Property>
>      <Dialog Id="PropertiesDlg" Width="290" Height="390"
> Title="[ProductName] [ProductVersion] $(var.Configuration)"
> NoMinimize="yes">
>        <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15"
> Transparent="yes" NoPrefix="yes" Text="Ready to Install" />
>        <Control Id="ComputerNameLabel" Type="Text" X="15" Y="26" Width="80"
> Height="15" Transparent="yes" NoPrefix="yes" Text="Computer Name" />
>        <Control Id="ComputerNameEdit" Type="Edit" X="114" Y="22"
> Width="150"
> Height="18" Property="FULLYQUALIFIEDCOMPUTERNAME" />
>        <Control Id="UserLabel" Type="Text" X="15" Y="46" Width="80"
> Height="15" Transparent="yes" NoPrefix="yes" Text="User" />
>        <Control Id="UserEdit" Type="Edit" X="114" Y="42" Width="150"
> Height="18" Property="SERVICEUSER" />
>        <Control Id="PasswordLabel" Type="Text" X="15" Y="66" Width="80"
> Height="15" Transparent="yes" NoPrefix="yes" Text="Password" />
>        <Control Id="PasswordEdit" Type="Edit" X="114" Y="62" Width="150"
> Height="18" Property="SERVICEPASSWORD" Password="yes" />
>        <Control Id="SqlServerLabel" Type="Text" X="15" Y="86" Width="100"
> Height="15" Transparent="yes" NoPrefix="yes" Text="BuySeasons Sql Server"
> />
>        <Control Id="SqlServerEdit" Type="Edit" X="114" Y="82" Width="150"
> Height="18" Property="SQLSERVER" />
>        <Control Id="TransactionsSqlServerLabel" Type="Text" X="15" Y="106"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Transactions
> Sql Server" />
>        <Control Id="TransactionsSqlServerEdit" Type="Edit" X="114" Y="102"
> Width="150" Height="18" Property="TRANSACTIONSSQLSERVER" />
>        <Control Id="ShippingSqlServerLabel" Type="Text" X="15" Y="126"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Shipping Sql
> Server" />
>        <Control Id="ShippingSqlServerEdit" Type="Edit" X="114" Y="122"
> Width="150" Height="18" Property="SHIPPINGSERVER" />
>        <Control Id="ReplicatedTransactionsSqlServerLabel" Type="Text"
> X="15"
> Y="146" Width="100" Height="15" Transparent="yes" NoPrefix="yes"
> Text="Replicated Sql Server" />
>        <Control Id="ReplicatedTransactionsSqlServerEdit" Type="Edit"
> X="114"
> Y="142" Width="150" Height="18" Property="REPLICATEDTRANSACTIONSERVER" />
>        <Control Id="InventoryServerLabel" Type="Text" X="15" Y="166"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Inventory
> Server" />
>        <Control Id="InventoryServerEdit" Type="Edit" X="114" Y="162"
> Width="150" Height="18" Property="INVENTORYSERVER" />
>        <Control Id="LyrisDatabaseSqlServerLabel" Type="Text" X="15" Y="186"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Lyris Sql
> Server" />
>        <Control Id="LyrisDatabaseSqlServerEdit" Type="Edit" X="114" Y="182"
> Width="150" Height="18" Property="LYRISSQLSERVER" />
>        <Control Id="LyrisDatabaseUserLabel" Type="Text" X="15" Y="206"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Lyris User
> Name" />
>        <Control Id="LyrisDatabaseUserEdit" Type="Edit" X="114" Y="202"
> Width="150" Height="18" Property="LYRISUSER" />
>        <Control Id="LyrisDatabasePasswordLabel" Type="Text" X="15" Y="226"
> Width="100" Height="15" Transparent="yes" NoPrefix="yes" Text="Lyris
> Password" />
>        <Control Id="LyrisDatabasePasswordEdit" Type="Edit" X="114" Y="222"
> Width="150" Height="18" Property="LYRISPASSWORD" Password="yes" />
>        <Control Id="SiteNameLabel" Type="Text" X="15" Y="286" Width="80"
> Height="15" Transparent="yes" NoPrefix="yes" Text="Site Name" />
>        <Control Id="SiteNameEdit" Type="Edit" X="114" Y="282" Width="150"
> Height="18" Property="COMMERCESERVERSITENAME" />
>        <Control Id="SmtpServerNameLabel" Type="Text" X="15" Y="306"
> Width="80" Height="15" Transparent="yes" NoPrefix="yes" Text="SMTP Server"
> />
>        <Control Id="SmtpServerNameEdit" Type="Edit" X="114" Y="302"
> Width="150" Height="18" Property="SMTPSERVERNAME" />
>        <Control Id="CyberSourceURLLabel" Type="Text" X="15" Y="326"
> Width="80" Height="15" Transparent="yes" NoPrefix="yes" Text="CyberSource
> URL" />
>        <Control Id="CyberSourceURLEdit" Type="Edit" X="114" Y="322"
> Width="150" Height="18" Property="CYBERSOURCEURL" />
>        <Control Id="OK" Type="PushButton" X="104" Y="352" Width="56"
> Height="17" Default="yes" Text="OK">
>          <Publish Event="EndDialog"
>
> Value="Return"/>
>        </Control>
>        <Control Id="Cancel" Type="PushButton" X="164" Y="352" Width="56"
> Height="17" Cancel="yes" Text="Cancel">
>          <Publish Event="EndDialog"
>
> Value="Exit"/>
>        </Control>
>      </Dialog>
>      <AdminUISequence />
>      <InstallUISequence />
>    </UI>
>  </Fragment>
> </Wix>
>
> Kevin Burton
> Senior Software Engineer
> BUYSEASONS
> 262-901-2000 Office
> 262-901-2312 Fax
> kev...@buyseasons.com
>
> -----Original Message-----
> From: Rob Mensching [mailto:r...@robmensching.com]
> Sent: Wednesday, February 16, 2011 9:40 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Conditionally invoking ServiceInstall Element
>
> I don't think more disk space should be consumed if things are cabbed and
> the service executable is identical in the two Components (one Conditioned,
> the other not) because only one will ever get installed on the machine (due
> to mutually exclusive Conditions) and smart-cabbing should make sure only
> one file is in the cabinet.
>
> (wow, that's one sentence <smile/>).
> On Mon, Feb 14, 2011 at 8:50 AM, Christopher Painter <
> chr...@deploymentengineering.com> wrote:
>
> > Technically it's a violation of the component rules.   However, if you
> can
> > make
> > sure that the two components ( whether they be in two merge modules or
> > no merge modules ) have mutually exclusive component conditions so
> > that only one will
> > ever be installed you can pretty much get away with it.   You will still
> > get
> > validation errors as part of the build though I believe.  I've done
> > this in the past  and my main complaint about it is it doesn't scale
> > well.
> >
> >
> > If dev doesn't want to redo the app,  what would be the effect of
> > taking consoleappservice.exe and copying / renaming it to have two files:
> >
> > consoleapp.exe
> > service.exe
> >
> > It's a confusing hack and you'll eat up more disk space then if you
> > factored it
> > out into the shared.dll   but you should be able to still do everything I
> > mentioned previously.   If this is .NET code it might not be happy but
> you
> > could
> > give it a try.
> >
> > Personally if it is a .NET service, I can't imagine it taking more
> > then a few hours to factor out, build and test.
> >
> > ---
> > Christopher Painter, Author of Deployment Engineering Blog Have a hot
> > tip, know a secret or read a really good thread that deserves
> > attention? E-Mail Me
> >
> >
> >
> > ----- Original Message ----
> > From: Gregg Swanson <gregg.swan...@microsoft.com>
> > To: General discussion for Windows Installer XML toolset.
> > <wix-users@lists.sourceforge.net>
> > Sent: Mon, February 14, 2011 10:38:26 AM
> > Subject: Re: [WiX-users] Conditionally invoking ServiceInstall Element
> >
> > Thanks for the help...
> >
> > I am a WIX rooky.
> >
> > Is this is a valid option -
> >
> > Package the consleappservice.exe in two separate merge modules, the
> > first doesn't invoke ServiceInstall the second does invoke
> ServiceInstall?
> >
> > The application that I am helping will have to refactor code and they
> > may be reluctant to do so at this point in time.
> >
> > Thanks,
> > Gregg
> >
> >
> > -----Original Message-----
> > From: Christopher Painter [mailto:chr...@deploymentengineering.com]
> > Sent: Monday, February 14, 2011 10:14 AM
> > To: General discussion for Windows Installer XML toolset.
> > Subject: Re: [WiX-users] Conditionally invoking ServiceInstall Element
> >
> > The ServiceControl element is a child of the Component which is a
> > child of the Feature element so the condition can be applied at the
> > Feature or Component level.  If the component is installed the service
> > will be installed and there's no way around that except to factor your
> > service out of the console app:
> >
> > consleappservice.exe ->  consoleapp.exe, service.exe, shared.dll
> >
> > Then you can put have Feature A reference  the consoleapp.exe and
> > shared.dll components and Feature B referene service.exe and
> > shared.dll components.  (
> > Note: There is only 1 shared.dll component )
> >
> > If feature B is installed you will get a service.  If feature B is not
> > installed you will not get a service but you can still have your
> > console app if feature A is installed.
> >
> > >From a SysAdmin's point of view it's silent installs can be:
> >
> > msiexec /i foo.msi ADDLOCAL=A  /qn   or
> > msiexec /i foo.msi ADDLOCAL=A,B /qn
> >
> > If the service was not previously installed and now desired they can
> > issue the
> > command:
> >
> > msiexec /i foo.msi ADDLOCAL=B /qn
> >
> > If the service was previously installed and no longer desired they can
> > issue the command
> >
> > msiexec /i foo.msi REMOVE=B /qn
> >
> > If they want to uninstall all together they can say:
> >
> > msiexec /x foo.msi  /qn  or
> > msiexec /i foo.msi REMOVE=ALL /qn
> >
> >
> > ---
> > Christopher Painter, Author of Deployment Engineering Blog Have a hot
> > tip, know a secret or read a really good thread that deserves
> > attention? E-Mail Me
> >
> >
> >
> > ----- Original Message ----
> > From: Gregg Swanson <gregg.swan...@microsoft.com>
> > To: "wix-users@lists.sourceforge.net"
> > <wix-users@lists.sourceforge.net>
> > Sent: Mon, February 14, 2011 9:48:47 AM
> > Subject: [WiX-users] Conditionally invoking ServiceInstall Element
> >
> > Hello,
> >
> > I have a Console application that may also be used as a Windows
> > Service. Is it possible to conditionally invoke or not invoke the
> > ServiceInstall element to control when the service is installed?
> >
> >
> > Thanks,
> > Gregg
> >
> >
>
> -----------------------------------------------------------------------------
> -
> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> > Pinpoint memory and threading errors before they happen.
> > Find and fix more than 250 security defects in the development cycle.
> > Locate bottlenecks in serial and parallel code that limit performance.
> > http://p.sf.net/sfu/intel-dev2devfeb
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
> >
> >
> >
>
> -----------------------------------------------------------------------------
> -
> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> > Pinpoint memory and threading errors before they happen.
> > Find and fix more than 250 security defects in the development cycle.
> > Locate bottlenecks in serial and parallel code that limit performance.
> > http://p.sf.net/sfu/intel-dev2devfeb
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
>
> -----------------------------------------------------------------------------
> -
> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> > Pinpoint memory and threading errors before they happen.
> > Find and fix more than 250 security defects in the development cycle.
> > Locate bottlenecks in serial and parallel code that limit performance.
> > http://p.sf.net/sfu/intel-dev2devfeb
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> >
> >
> >
> >
> >
>
> -----------------------------------------------------------------------------
> -
> > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> > Pinpoint memory and threading errors before they happen.
> > Find and fix more than 250 security defects in the development cycle.
> > Locate bottlenecks in serial and parallel code that limit performance.
> > http://p.sf.net/sfu/intel-dev2devfeb
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
>
>
> --
> virtually, Rob Mensching - http://RobMensching.com LLC
>
> -----------------------------------------------------------------------------
> -
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> -----------------------------------------------------------------------------
> -
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
>
> generated by your applications, servers and devices whether physical,
> virtual or in the cloud. Deliver compliance at lower cost and gain new
> business insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> SDL PLC confidential, all rights reserved.
> If you are not the intended recipient of this mail SDL requests and
> requires that you delete it without acting upon or copying any of its
> contents, and we further request that you advise us.
> SDL PLC is a public limited company registered in England and Wales.
>  Registered number: 02675207.
> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6
> 7DY, UK.
>
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data generated by your applications, servers and devices whether physical,
> virtual or in the cloud. Deliver compliance at lower cost and gain new
> business insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


-- 
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to