system variables

BlitzMax Forums/BlitzMax Programming/system variables

PantsOn(Posted 2007) [#1]
Hi

Is there a way to find system variables in windows from BlitzMax?

ie %USERPROFILE%

I've tried searching the forums and can't find any info.

cheers
Rich


Yan(Posted 2007) [#2]
Print getenv_("USERPROFILE")



PantsOn(Posted 2007) [#3]
ah ha.
cheers


JazzieB(Posted 2007) [#4]
This also works on Mac and Linux. I've been messing around with environment variables all weekend across all three platforms. Obviously, there are differences in the names of the variables, but not too much.

To get a list of those currently available in Windows, open up the console and type set at the prompt.

In Mac OS X and Linux, open up a terminal and type env at the prompt instead.

Remember though that some of these will have been set up by various programs that may be installed, so may not be present on all systems. The system ones are quite obvious though, like the various folder locations and user information. Googling will provide a full list of these variables if you need it.

You may have already knew this, but thought I would add it for the benefit of others.