My understanding of original problem is that environment variables are
created on install, but not deleted on uninstall.
Action="remove" must be used when environment variable needs to be deleted
*on install*.
As Rob already mentioned, there is nothing wrong with <Environment> tag
itself.  Problem is somewhere outside.  If component is not made permanent,
another thing to look for is any condition on component or
<RemoveEnvironmentStrings> in <InstallExecuteSequence>.  Without seeing more
of original wxs we are just guessing here.

Alex


-----Original Message-----
From: David Bartmess [mailto:david.bartm...@wallst.com] 
Sent: Thursday, July 02, 2009 8:00 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Env variables don't get deleted

For what it's worth, here's the text from the schema description. Pay
attention to the description of the remove action

Specfies whether the environmental variable should be created, set or
removed when the parent component is installed. This attribute's value must
be one of the following:

create
    Creates the environment variable if it does not exist, then set it
during installation. This has no effect on the value of the environment
variable if it already exists.

set
    Creates the environment variable if it does not exist, and then set it
during installation. If the environment variable exists, set it during the
installation.

remove
    Removes the environment variable during an installation. The installer
only removes an environment variable during an installation if the name and
value of the variable match the entries in the Name and Value fields of the
Environment table. If you want to remove an environment variable, regardless
of its value, use the '!' syntax, and leave the Value field empty. 

-----Original Message-----
From: sandun css [mailto:sandun...@gmail.com] 
Sent: Thursday, July 02, 2009 5:27 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Env variables don't get deleted

No Rob. Those don't apply.

On Thu, Jul 2, 2009 at 11:56 AM, Rob Hamflett <r...@snsys.com> wrote:

> Setting Permanent="yes" on the Component or forgetting to give it a 
> GUID would make the env var change permanent.  Do either of these 
> apply?
>
> Rob
>
> sandun css wrote:
> > Hi,
> >
> > I set few env variables from my msi. But they don't get deleted when 
> > I uninstall them. This is my code,
> >
> >       <Environment Id='ENVVAR' Name='CONFIG' Action='set' Part='all'
> > Value='[INSTALLDIR]etc\middleware.cfg' System='yes' Permanent='no'/> 
> > What can be the problem?
> >
> > Thanks,
> > Sandun
> >
> ----------------------------------------------------------------------
> --------
>
>
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to