Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 931
  • Last Modified:

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

 
0
cintra
Asked:
cintra
2 Solutions
 
diasroshanCommented:
0
 
sandeep_patelCommented:
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
 
cintraAuthor Commented:
Thank you both for taking time to comment. I shall look at both solutions and allocate points shortly.
 
 
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now