Java/NetRexx property for the 'Program Files' folder.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java/NetRexx property for the 'Program Files' folder.

Thomas.Schneider.Wien
Does anybody know hos I can get the 'property name' and it's value
for the 'Program files' Folder (Windows XP) from a running Java Program.

I would need this:

a.) to read my Thunderbird message Folders/Archives.
b) for my Installation routine I'm just writing (in NetRexx)

Thomas.

--
Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com
www.thsitc.com
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Tom. (ths@db-123.com)
Reply | Threaded
Open this post in threaded view
|

Re: Java/NetRexx property for the 'Program Files' folder.

George Hovey-2
Thomas,
The "environment variable" (ie, "property name")  is "ProgramFiles".
Get its value with java.lang.System.getenv( "ProgramFiles" ).   On my
XP machine it has the value "C:\Program Files" but it might be unwise
to count on this.
George Hovey

On 1/10/11, Thomas Schneider <[hidden email]> wrote:

> Does anybody know hos I can get the 'property name' and it's value
> for the 'Program files' Folder (Windows XP) from a running Java Program.
>
> I would need this:
>
> a.) to read my Thunderbird message Folders/Archives.
> b) for my Installation routine I'm just writing (in NetRexx)
>
> Thomas.
>
> --
> Thomas Schneider Projects PP, ReyC, and LOGOS on www.KENAI.com
> www.thsitc.com
> _______________________________________________
> Ibm-netrexx mailing list
> [hidden email]
>
>
_______________________________________________
Ibm-netrexx mailing list
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Java/NetRexx property for the 'Program Files' folder.

Fernando Cassia-2
On Tue, Jan 11, 2011 at 12:19 AM, George Hovey <[hidden email]> wrote:
> Thomas,
> The "environment variable" (ie, "property name")  is "ProgramFiles".
> Get its value with java.lang.System.getenv( "ProgramFiles" ).   On my
> XP machine it has the value "C:\Program Files" but it might be unwise
> to count on this.
> George Hovey

Depends on the language of windows. In any case, system variables like
TEMP, TMP, are a standard in Windows, and will always point to the
right location.

Here are the most common:

http://technet.microsoft.com/en-us/library/cc749104(WS.10).aspx
and here
http://xahlee.org/mswin/env_var.html

On my Spanish WinXP SP3 netbook:

ComSpec=C:\WINDOWS\system32\cmd.exe
HOMEDRIVE=C:
PROMPT=$P$G
REGINA_LANG=en
REGINA_LANG_DIR=c:\Regina
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\SIRAGON\CONFIG~1\Temp
TMP=C:\DOCUME~1\SIRAGON\CONFIG~1\Temp
USERDOMAIN=ML1030
USERNAME=SIRAGON
USERPROFILE=C:\Documents and Settings\SIRAGON
windir=C:\WINDOWS
HOMEPATH=\Documents and Settings\SIRAGON
ProgramFiles=C:\Archivos de programa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]