I wish to set/Export an Environment Variable from within a Powerbuilder Application

Hi,

I would be grateful for an example which illustrates how to export an environment variable from a Powerbuilder application, running on Windows XP.

Thanks

 
cintraAsked:
Who is Participating?
 
sandeep_patelConnect With a Mentor Commented:
In a system there are two types of env variables..
1) User variables
2) System variables.

> All user variables are defined under below registry...
HKEY_CURRENT_USER\Environment
> All System variables are defined under below registry...
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Then use RegistryValues, RegistryGet to get the values of those entries..

You can also use RegistrySet to set new environment variable in registry.

See PB help for more information these functions or let me know if you need more information.

Regards,
Sandeep


0
 
diasroshanConnect With a Mentor Commented:
0
 
cintraAuthor Commented:
Thank you both for taking time to comment. I shall look at both solutions and allocate points shortly.
 
 
0
All Courses

From novice to tech pro — start learning today.