Page 1 of 1

Defining a DOS environment variable

Posted: Fri Apr 04, 2008 9:39 am
by driessen
Hello,

The function GETENV() is used to read a DOS environment variable in a FW-application.

But does anyone know how to define a DOS environment variable from in a FW-application ?

Thanks a lot in advance.

Posted: Fri Apr 04, 2008 11:49 am
by Antonio Linares
Michel,

From Windows API:

BOOL SetEnvironmentVariable(
LPCTSTR lpName, // address of environment variable name
LPCTSTR lpValue // address of new value for variable
);

Notice that it sets the environment variable for the current process

Posted: Fri Apr 04, 2008 1:20 pm
by driessen
Antonio,

Thanks for your answer.

It's working fine.

Regards,