Feature not properly uninstalled when Level 0

6 messages Options
Embed this post
Permalink
Rob Hamflett

Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
I've got a feature that I only want to be installed if Visual Studio 2005 C++ is installed.  I
search the registry for a particular value to indicate if it is present or not, and set this value
to a property called FOUND_VC80DIR, which initially has the value of "UNKNOWN".  On my feature I
have this condition:
<Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>

I'm trying to work out how to get my product to uninstall after the user has removed Visual Studio.
  I install my product, remove the VS value I reference (to simulate an uninstall without actually
having to sit through it) and then uninstall my product.  The product is uninstalled but it leaves
behind the files from this feature.  I tried adding "AND NOT REMOVE" to the condition, but this only
seems to work if if I uninstall it by using the "msiexec /x" from the command line.  If I go through
the UI and choose to remove it then I am still left with the files.  Can anyone let me know how to
get round this?

Thanks,
Rob


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Pally Sandher

Re: Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
I think your problem is due to using Level="0". See ->
http://msdn.microsoft.com/en-us/library/aa369536.aspx

Personally I would recommend you don't set your property to anything to
start with, simply use RegistrySearch to set it (so it will be null
unless your RegistrySearch is successful) & change your condition to:
<Condition Level="1"><![CDATA[FOUND_VC80DIR OR Installed]]></Condition>
as well as changing the Feature's Level to 9999 (or higher if you use
INSTALLLEVEL's as high as 9999 & above but 9999 should be high enough
for most people).
This should make it only install if the FOUND_VC80DIR has a value set &
should make it always uninstall.

Works for me in 3 (or 12 depending on whether you count the supported
applications individually rather than the features it's implemented in)
almost identical situations to this.

Good Luck.

Palbinder Sandher
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500
F: +44 (0) 141 945 8501

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer


-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: 27 October 2009 15:26
To: [hidden email]
Subject: [WiX-users] Feature not properly uninstalled when Level 0

I've got a feature that I only want to be installed if Visual Studio
2005 C++ is installed.  I search the registry for a particular value to
indicate if it is present or not, and set this value to a property
called FOUND_VC80DIR, which initially has the value of "UNKNOWN".  On my
feature I have this condition:
<Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>

I'm trying to work out how to get my product to uninstall after the user
has removed Visual Studio.
  I install my product, remove the VS value I reference (to simulate an
uninstall without actually having to sit through it) and then uninstall
my product.  The product is uninstalled but it leaves behind the files
from this feature.  I tried adding "AND NOT REMOVE" to the condition,
but this only seems to work if if I uninstall it by using the "msiexec
/x" from the command line.  If I go through the UI and choose to remove
it then I am still left with the files.  Can anyone let me know how to
get round this?

Thanks,
Rob


------------------------------------------------------------------------
------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is
the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay ahead of the curve. Join us from November 9 - 12, 2009. Register
now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Bob Arnson-6

Re: Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Rob Hamflett
Rob Hamflett wrote:
> <Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>
>
> I'm trying to work out how to get my product to uninstall after the user has removed Visual Studio.
>  

http://www.joyofsetup.com/2008/05/16/make-sure-features-are-always-enabled-so-they-can-be-removed/

--
sig://boB
http://joyofsetup.com/



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Rob Hamflett

Re: Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
The approach in that blog post is essentially the same as what I tried with the REMOVE condition.
I'm disabling the feature and using "AND NOT REMOVE" in the condition, whereas the blog post talks
about enabling the feature with "OR REMOVE" in the condition.  I tried the latter approach, but it
still only works if there's no UI (e.g. uninstall via ARP).  If I re-run the installer in
maintenance mode and choose the 'Remove' option, then the files get left behind.

I might try setting the property REMOVE to ALL on that last dialog and seeing if it has any affect
on costing in the install execute sequence.

Rob

Bob Arnson wrote:
> Rob Hamflett wrote:
>> <Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>
>>
>> I'm trying to work out how to get my product to uninstall after the user has removed Visual Studio.
>>  
>
> http://www.joyofsetup.com/2008/05/16/make-sure-features-are-always-enabled-so-they-can-be-removed/
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Rob Hamflett

Re: Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Pally Sandher
The problem with using install levels other than 0 means the feature is still in the feature tree,
so the user can still choose to install it if they want.  I might have to live with that though.

Rob

Pally Sandher wrote:

> I think your problem is due to using Level="0". See ->
> http://msdn.microsoft.com/en-us/library/aa369536.aspx
>
> Personally I would recommend you don't set your property to anything to
> start with, simply use RegistrySearch to set it (so it will be null
> unless your RegistrySearch is successful) & change your condition to:
> <Condition Level="1"><![CDATA[FOUND_VC80DIR OR Installed]]></Condition>
> as well as changing the Feature's Level to 9999 (or higher if you use
> INSTALLLEVEL's as high as 9999 & above but 9999 should be high enough
> for most people).
> This should make it only install if the FOUND_VC80DIR has a value set &
> should make it always uninstall.
>
> Works for me in 3 (or 12 depending on whether you count the supported
> applications individually rather than the features it's implemented in)
> almost identical situations to this.
>
> Good Luck.
>
> Palbinder Sandher
> Software Deployment & IT Administrator
> T: +44 (0) 141 945 8500
> F: +44 (0) 141 945 8501
>
> http://www.iesve.com 
> **Design, Simulate + Innovate with the <Virtual Environment>**
> Integrated Environmental Solutions Limited. Registered in Scotland No.
> SC151456
> Registered Office - Helix Building, West Of Scotland Science Park,
> Glasgow G20 0SP
> Email Disclaimer
>
>
> -----Original Message-----
> From: Rob Hamflett [mailto:[hidden email]]
> Sent: 27 October 2009 15:26
> To: [hidden email]
> Subject: [WiX-users] Feature not properly uninstalled when Level 0
>
> I've got a feature that I only want to be installed if Visual Studio
> 2005 C++ is installed.  I search the registry for a particular value to
> indicate if it is present or not, and set this value to a property
> called FOUND_VC80DIR, which initially has the value of "UNKNOWN".  On my
> feature I have this condition:
> <Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>
>
> I'm trying to work out how to get my product to uninstall after the user
> has removed Visual Studio.
>   I install my product, remove the VS value I reference (to simulate an
> uninstall without actually having to sit through it) and then uninstall
> my product.  The product is uninstalled but it leaves behind the files
> from this feature.  I tried adding "AND NOT REMOVE" to the condition,
> but this only seems to work if if I uninstall it by using the "msiexec
> /x" from the command line.  If I go through the UI and choose to remove
> it then I am still left with the files.  Can anyone let me know how to
> get round this?
>
> Thanks,
> Rob
>
>
> ------------------------------------------------------------------------
> ------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA is
> the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and
> stay ahead of the curve. Join us from November 9 - 12, 2009. Register
> now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Rob Hamflett

Re: Feature not properly uninstalled when Level 0

Reply Threaded More More options
Print post
Permalink
In reply to this post by Rob Hamflett
Setting the REMOVE property on the final dialog was the missing piece of the puzzle.  In works when
following the method from your blog post.  I thought the REMOVE property got set internally.
Apparently not.  Anyway, thanks for the help.

Rob

Rob Hamflett wrote:

> The approach in that blog post is essentially the same as what I tried with the REMOVE condition.
> I'm disabling the feature and using "AND NOT REMOVE" in the condition, whereas the blog post talks
> about enabling the feature with "OR REMOVE" in the condition.  I tried the latter approach, but it
> still only works if there's no UI (e.g. uninstall via ARP).  If I re-run the installer in
> maintenance mode and choose the 'Remove' option, then the files get left behind.
>
> I might try setting the property REMOVE to ALL on that last dialog and seeing if it has any affect
> on costing in the install execute sequence.
>
> Rob
>
> Bob Arnson wrote:
>> Rob Hamflett wrote:
>>> <Condition Level="0"><![CDATA[FOUND_VC80DIR = "UNKNOWN"]]></Condition>
>>>
>>> I'm trying to work out how to get my product to uninstall after the user has removed Visual Studio.
>>>  
>> http://www.joyofsetup.com/2008/05/16/make-sure-features-are-always-enabled-so-they-can-be-removed/
>>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users