We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

how to get environment variables in delphi3

pman
pman asked
on
Medium Priority
308 Views
Last Modified: 2010-04-04
How can I get the environment variables (e.g.: PATH or USERNAME) in a Delphi3-program ??? What is the function therfor?
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
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

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.