Powerbuilder Setting Environment variables in Windows 7
Posted on 2011-02-22
We define a local external function in a window below as
//Local External function
Function Boolean SetEnvironmentVariableA(String lpName, String lpValue) Library "kernel32.dll"
and then in a script call as
Boolean lbl_ret = TRUE
ls_version = "1.0"
ls_env_name = "TESTENV"
lbl_ret = SetEnvironmentVariableA ( ls_envname, ls_version )
This works on XP, but not with Windows 7.
i.e The environment variable is created in XP, but not in Windows 7.
Any help on how to create an environment variable from Powerbuilder in Windows 7 very much appreciated. ( Please note, for security reasosn, we are unable to use the RegistrySet function )
Running Powerbuilder 10.5.2 Build 7826