Per,

 

Change your condition to :

 

<Condition Message='Share-A-space is not installed or properly
configured on this machine.'>COMPANYDIR AND NOT Installed</Condition>

 

Note that this way the message will only appear if your current product
is not installed on the machine (this means it won't show the message in
minor upgrades and uninstalls).

 

If you wish to evaluate the message on minor upgrades too, you can use
this:

 

<Condition Message='Share-A-space is not installed or properly
configured on this machine.'>COMPANYDIR AND NOT REMOVE ~=
"ALL"</Condition>

 

So the message is not shown when you remove the product.

 

Both the "REMOVE" and "Installed" properties are internal properties,
you do not need to declare them or search for them.

Hope that helps,

 

MP.

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Per Guting
Sent: Tuesday, February 05, 2008 3:19 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to run Conditions only on install and not
onuninstall

 

Hi all,

I have a condition that checks if another product is installed (if the
product is installed the installation may proceed), during installation
the condition works fine but when I uninstall it seems that the MSI
tries to evaluate the condition again and if the product that the
condition is supposed to look for is removed it fails and I can't
uninstall my product, is there any way to just check the condition only
during install (and not during uninstall)?

 

Below is the condition:

 

    <Property Id="COMPANYDIR">

      <RegistrySearch Id='SAsInstllPath' Type='raw' Root='HKLM'
Key='SOFTWARE\ECS\SAs' Name='InstallPath' Win64='yes' />

    </Property>

 

    <!-- CHECK THAT SHARE-A-SPACE IS INSTALLED ON THE SERVER -->

    <Condition Message='Share-A-space is not installed or properly
configured on this machine.'>COMPANYDIR</Condition>

 

 

Any help appreciated!

 

 

/Per G

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

Reply via email to