$(env.TEMP) would give you the environment variable's value on the build 
machine, which doesn't help at install time.  So this doesn't really solve the 
problem of finding the environment variable's value on the user's system.  It 
also still gives the value of the environment variable as it is set for the 
user, not for the system.

I'm pretty sure that to get the System's value, you need a dll custom action.


But, even though you can do something, doesn't mean you should.  I would highly 
advise against modifying the permissions on anything that is not specific to 
your own software.  System folders fall into that category.  Don't do it.

The only time I would think modifying permissions of system folders would be 
acceptable is if you're deploying only onto machines where you are the 
administrator.  But if you are the administrator of the machines, you've 
probably got other methods of determining where the system temp folder is and 
changing its permissions.

-Ari



-----Original Message-----
From: Eitan Behar [mailto:ei...@baconao.net] 
Sent: Wednesday, February 04, 2009 10:50 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

You can read an environment variable using:


$(env.TEMP)
You can use:

<SetDirectory Id="TempFolder" Value="$(env.TEMP)" Sequence="execute" />



On Wed, Feb 4, 2009 at 6:06 PM, Yan Sklyarenko <y...@sitecore.net> wrote:

> Hello WiX community,
>
> That's a really newbie question.
>
> I need to set permissions to the TEMP folder, the one stated in the
> system TEMP environment variable.
> I was trying this way:
>
> <!-- Setting permissions to the environment Temp folder -->
> <DirectoryRef Id="TempFolder">
>   <Component DiskId="1" Id="TempComp"
> Guid="{YOURGUID-GOES-HERE-B106-B9D9705E01D7}" Permanent="yes">
>      <CreateFolder>
>         <util:PermissionEx ... />
>      </CreateFolder>
>   </Component>
> </DirectoryRef>
>
> But this way it references the user-specific TEMP variable, the one
> under Documents & Settings.
>
> Could you please point me to the right direction?
> Thanks.
>
> -- Yan
>
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to