Environment variable set where?

L

Linn Kubler

Hi,

I have an application that uses the environment variable ClientName to store
some information. It looks like this env. variable is set in the registry
in the hkcu hive. It is set for console, is this some sort of default and
can I change it? Do I have to change it here or is there a control panel
somewhere that handles this setting? I first looked in the System control
panel, under Environment Variables but didn't see it there at all.

I want to set this to the machine name cause I have a number of identical
systems and they are currently all set the same, I'd like them unique.

Any suggestions?

Thanks in advance,
Linn
 
D

Dave Patrick

:
| Hi,
|
| I have an application that uses the environment variable ClientName to
store
| some information. It looks like this env. variable is set in the registry
| in the hkcu hive.
* Where are you getting this?

It is set for console, is this some sort of default and
| can I change it?
* And this?

Do I have to change it here or is there a control panel
| somewhere that handles this setting? I first looked in the System control
| panel, under Environment Variables but didn't see it there at all.
* From a command prompt;
set
will display the system and user environment variables.


| I want to set this to the machine name cause I have a number of identical
| systems and they are currently all set the same, I'd like them unique.
* You can ADD the variable to Control Panel|System|Advanced|Environment
Variables as a system or user variable depending on your needs.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
C

cquirke (MVP Windows shell/user)

On Fri, 15 Jul 2005 17:16:18 -0500, "Linn Kubler"
I have an application that uses the environment variable ClientName to store
some information. It looks like this env. variable is set in the registry
in the hkcu hive. It is set for console, is this some sort of default and
can I change it? Do I have to change it here or is there a control panel
somewhere that handles this setting? I first looked in the System control
panel, under Environment Variables but didn't see it there at all.
I want to set this to the machine name cause I have a number of identical
systems and they are currently all set the same, I'd like them unique.

Newly-started sessions take their variables from the following
registry keys, so that setting these before any sessions have started
will pass variables to the environment of these sessions:

HKLM\SYSTEM\CurrentControlSet\...\Environment
HKCU\Environment
HKCU\Volatile Environment

The HKEY_CURRENT_USER settings override (in the case of Path, append)
the values set in HKEY_LOCAL_SYSTEM. As the name suggests, the
Volatile Environment does not persist after restarting Windows.

If you set values in these keys programatically, e.g. my merging in a
..REG file or using Reg from a batch file, then the changes do not
appear until the next Windows session (or ever, in the case of
Volatile). So you may need MS's SetX.exe from the SP2 Support
subtree, or a free third-party tool called SetEnv.exe

SetEnv has easier syntax than SetX.exe, plus it supports the Volatile
Environment, which SetX.exe does not.

Both these tools will cause changes to be immediately available to
sessions started after the changes are made. Any existing sessions
will more likely ignore the changes, unless they specifically check to
see whether the environment has changed.


------------------------ ---- --- -- - - - -
Forget http://cquirke.blogspot.com and check out a
better one at http://topicdrift.blogspot.com instead!
 
L

Linn Kubler

Thanks for the information. My problem isn't how to set the environment
variable but rather simply identify where the env. is being set. Once I
locate that I can try to figure out how to set it the way I want.

Thanks,
Linn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top