Link to home
Start Free TrialLog in
Avatar of pman
pman

asked on

how to get environment variables in delphi3

How can I get the environment variables (e.g.: PATH or USERNAME) in a Delphi3-program ??? What is the function therfor?
ASKER CERTIFIED SOLUTION
Avatar of mtieland
mtieland

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mtieland
mtieland

Forgot to tell you:

how to use the function:
type SET in a dosbox to find out the names of the EnvVars

Lets say you want the username:

var UserName : String;

UserName:=GetEnvVar('USERNAME');

Good Luck
..Wouldn't it be nice to now, which variables were available?

/Williams
That was not the question I think? Williams
I know, that's why I asked pman. Maybe he didn't know it was possible :-)

Relax Martijn ..You answered his question, so you well enough deserve the credits!

/Williams