Re: How to reference a system environment variable?

8 messages Options
Embed this post
Permalink
Igor Paniushkin

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
Hi all,
 
I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP,
how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx
element from Util extensions?
 
Igor
 
-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?
 
As horrible as it may be, I've been reading system environment values
out of
SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4
years
now and there haven't
been any support issues (both XP and Vista).  I don't use this for
setting
values though.  I use the
normal Environment WiX element.
 
Rob
 
Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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
 
 
------------------------------------------------------------------------
------
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
[hidden email]
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

 


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.
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Igor Paniushkin

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
I already figured out, I need to specify Directory element and not
DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,
 
I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP,
how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx
element from Util extensions?
 
Igor
 
-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?
 
As horrible as it may be, I've been reading system environment values
out of
SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4
years
now and there haven't
been any support issues (both XP and Vista).  I don't use this for
setting
values though.  I use the
normal Environment WiX element.
 
Rob
 
Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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
 
 
------------------------------------------------------------------------
------
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
[hidden email]
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

 


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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Yan Sklyarenko

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
Note that if you set permissions to a folder with PermissionEx element,
the permissions are set recursively for all descendants. This means if
your TEMP folder exists and is full of folders/files, the installation
time will increase...

-- Yan

-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 6:01 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not
DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,
 
I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP,
how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx
element from Util extensions?
 
Igor
 
-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?
 
As horrible as it may be, I've been reading system environment values
out of
SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4
years
now and there haven't
been any support issues (both XP and Vista).  I don't use this for
setting
values though.  I use the
normal Environment WiX element.
 
Rob
 
Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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
 
 
------------------------------------------------------------------------
------
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
[hidden email]
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

 


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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Weber Stefan (IT)

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Igor Paniushkin
i´ve never used it, but there is a standard Property "TempFolder" you could use, instead of searching the registry.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="TempFolder">
        <Component ......
        </Component>
  </Directory>
</Directory>

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Paniushkin [mailto:[hidden email]]
Gesendet: Mittwoch, 1. Juli 2009 17:01
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,

I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP, how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx element from Util extensions?

Igor

-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

As horrible as it may be, I've been reading system environment values out of SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4 years now and there haven't been any support issues (both XP and Vista).  I don't use this for setting values though.  I use the normal Environment WiX element.

Rob

Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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


------------------------------------------------------------------------
------
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
[hidden email]
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




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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Igor Paniushkin

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
It was already mentioned in the beginning of this conversation, that TempFolder points to temp folder of current user, which performs installation, but I need system temp folder.

-----Original Message-----
From: Weber Stefan (IT) [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 12:51
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

i´ve never used it, but there is a standard Property "TempFolder" you could use, instead of searching the registry.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="TempFolder">
        <Component ......
        </Component>
  </Directory>
</Directory>

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Paniushkin [mailto:[hidden email]]
Gesendet: Mittwoch, 1. Juli 2009 17:01
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,

I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP, how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx element from Util extensions?

Igor

-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

As horrible as it may be, I've been reading system environment values out of SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4 years now and there haven't been any support issues (both XP and Vista).  I don't use this for setting values though.  I use the normal Environment WiX element.

Rob

Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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


------------------------------------------------------------------------
------
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
[hidden email]
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




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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Peter Shirtcliffe

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink

I dont know if this is applicable to your problem but if you just need a directory for your application to generate temporary files in or to do other work, you could create your own working directory under [CommonAppDataFolder]<CompanyName>\<ApplicationName>.

You control the location and you can set whatever permissions you like on it without interfering with anyone else. The inherited permissions mean that a standard user cannot write to this directory by default so you might need to add permission for Everyone (or some other user group) to write there.

You can use RemoveFiles\RemoveFolder elements to clean it up during uninstallation.

-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: 02 July 2009 12:46
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

It was already mentioned in the beginning of this conversation, that TempFolder points to temp folder of current user, which performs installation, but I need system temp folder.

-----Original Message-----
From: Weber Stefan (IT) [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 12:51
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

i´ve never used it, but there is a standard Property "TempFolder" you could use, instead of searching the registry.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="TempFolder">
        <Component ......
        </Component>
  </Directory>
</Directory>

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Paniushkin [mailto:[hidden email]]
Gesendet: Mittwoch, 1. Juli 2009 17:01
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,

I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP, how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx element from Util extensions?

Igor

-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

As horrible as it may be, I've been reading system environment values out of SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4 years now and there haven't been any support issues (both XP and Vista).  I don't use this for setting values though.  I use the normal Environment WiX element.

Rob

Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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


------------------------------------------------------------------------
------
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
[hidden email]
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




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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Rafael Rivera

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Igor Paniushkin
Okay, I'll bite. Why do you need the Windows temporary folder vice the user's?


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "Igor Paniushkin" <[hidden email]>

Date: Thu, 2 Jul 2009 13:45:55
To: General discussion for Windows Installer XML toolset.<[hidden email]>
Subject: Re: [WiX-users] How to reference a system environment variable?


It was already mentioned in the beginning of this conversation, that TempFolder points to temp folder of current user, which performs installation, but I need system temp folder.

-----Original Message-----
From: Weber Stefan (IT) [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 12:51
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

i´ve never used it, but there is a standard Property "TempFolder" you could use, instead of searching the registry.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="TempFolder">
        <Component ......
        </Component>
  </Directory>
</Directory>

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Paniushkin [mailto:[hidden email]]
Gesendet: Mittwoch, 1. Juli 2009 17:01
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,

I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP, how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx element from Util extensions?

Igor

-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

As horrible as it may be, I've been reading system environment values out of SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4 years now and there haven't been any support issues (both XP and Vista).  I don't use this for setting values though.  I use the normal Environment WiX element.

Rob

Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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


------------------------------------------------------------------------
------
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
[hidden email]
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




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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Igor Paniushkin

Re: How to reference a system environment variable?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Peter Shirtcliffe
I don't really sure why we use system temp, but I think it is because application for which I am writing installer was written a long time ago, when everyone was using system temp by default. Currently application is migrating to C#, but still some parts will be remained untouched and nobody wants to fix this problem now. And also one of my coworkers said that it is also probably because we have webdav on our website and then it seems that network service (which is running our website) writes temp files to system temp.


-----Original Message-----
From: Rafael Rivera [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 15:49
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

Okay, I'll bite. Why do you need the Windows temporary folder vice the user's?

-----Original Message-----
From: Peter Shirtcliffe [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 14:04
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?


I dont know if this is applicable to your problem but if you just need a directory for your application to generate temporary files in or to do other work, you could create your own working directory under [CommonAppDataFolder]<CompanyName>\<ApplicationName>.

You control the location and you can set whatever permissions you like on it without interfering with anyone else. The inherited permissions mean that a standard user cannot write to this directory by default so you might need to add permission for Everyone (or some other user group) to write there.

You can use RemoveFiles\RemoveFolder elements to clean it up during uninstallation.

-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: 02 July 2009 12:46
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

It was already mentioned in the beginning of this conversation, that TempFolder points to temp folder of current user, which performs installation, but I need system temp folder.

-----Original Message-----
From: Weber Stefan (IT) [mailto:[hidden email]]
Sent: Thursday, July 02, 2009 12:51
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to reference a system environment variable?

i´ve never used it, but there is a standard Property "TempFolder" you could use, instead of searching the registry.

<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="TempFolder">
        <Component ......
        </Component>
  </Directory>
</Directory>

Stefan

-----Ursprüngliche Nachricht-----
Von: Igor Paniushkin [mailto:[hidden email]]
Gesendet: Mittwoch, 1. Juli 2009 17:01
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] How to reference a system environment variable?

I already figured out, I need to specify Directory element and not DirectoryRef element, which I tried before.

If somebody interested, there is code to do that:

    <Property Id="SYSTEM_TEMP_FOLDER">
      <RegistrySearch Id="SystemTempFolder"
Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Root="HKLM" Type="directory" Name="TEMP" />
    </Property>

  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="SYSTEM_TEMP_FOLDER">
      <Component Id="SystemTempFolder" KeyPath="yes" Permanent="yes"
Guid="*">
        <CreateFolder>
          <PermissionEx User="NameOfUser" GenericRead="yes"
GenericWrite="yes"
xmlns="http://schemas.microsoft.com/wix/UtilExtension" />
        </CreateFolder>
      </Component>
    </Directory>
        ...

Igor


-----Original Message-----
From: Igor Paniushkin [mailto:[hidden email]]
Sent: Wednesday, July 01, 2009 16:39
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

Hi all,

I have a question about setting permissions on SYSTEM temp environment
directory:
If I will read information from registry about location of SYSTEM TEMP, how can I use it to set permissions?
Should I write custom actions to do that? Can I reuse PermissionEx element from Util extensions?

Igor

-----Original Message-----
From: Rob Hamflett [mailto:[hidden email]]
Sent: Thursday, February 05, 2009 03:01
To: [hidden email]
Subject: Re: [WiX-users] How to reference a system environment variable?

As horrible as it may be, I've been reading system environment values out of SYSTEM\CurrentControlSet\Control\Session Manager\Environment for about 4 years now and there haven't been any support issues (both XP and Vista).  I don't use this for setting values though.  I use the normal Environment WiX element.

Rob

Yan Sklyarenko wrote:

> He-he, nope, this references the local TEMP as well, I've tried this.
> I've also browsed the forums for this info, and the best approach I've
> found so far is to search the system registry for the key
> HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment, and
> the value TEMP underneath.
>
> This works for me, but maybe others know about the drawbacks of this
> approach? I would really like to know if there's any.
>
> Thank you.
>
> -- Yan
>
> -----Original Message-----
> From: Wilson, Phil [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 10:29 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] How to reference a system environment
variable?

>
> The MSI way to get this would be [%TEMP] (formatted type in Windows
> Installer) so you just need to get that in your WiX source somewhere.
>
> Phil Wilson
>
>
> -----Original Message-----
> From: Yan Sklyarenko [mailto:[hidden email]]
> Sent: Wednesday, February 04, 2009 8:07 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: [WiX-users] How to reference a system environment variable?
>
> 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
> [hidden email]
> 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
> [hidden email]
> 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


------------------------------------------------------------------------
------
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
[hidden email]
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




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.
------------------------------------------------------------------------
------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users