Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to permanently aktivate a new EnvironmentVariable

0 views
Skip to first unread message

Henrik Jonsson

unread,
Feb 19, 2002, 2:43:42 AM2/19/02
to
Hi

I tried using SetEnvironmentVariable but the variable is lost when the
applikation is closed.
I want it to stay. Maybe have the possibility to get ridd of it later.

Is there a way to solv this?

/Henrik


Ray Cernis

unread,
Feb 19, 2002, 6:35:53 AM2/19/02
to
It depends which version of Windows (presumably, since this is a WinApi
group) you're running.

With W2K, for example, "permanent" environment variables are controlled from
the Settings/Control Panel/System/Advanced tab. With W95, I believe
autoexec.bat is still used. (With Linux systems, you change the user's logon
script, or the system startup script, depending on whether you want it
global or local.)

Ray

"Henrik Jonsson" <henrik....@ninetechgruppen.se> wrote in message
news:3c72022e_2@dnews...

Bas Gooijen

unread,
Feb 19, 2002, 3:48:43 PM2/19/02
to
under nt/2k/xp:

change the variables in the registry, key:
user: HKEY_CURRENT_USER\Environment
system: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment


then reboot your computer, or call:
SendMessage(HWND_BROADCAST,WM_INICHANGE,0,pchar('Environment'));

under win95/98:
change their values in c:\autoexec.bat, and reboot.


--

Bas Gooijen


"Henrik Jonsson" <henrik....@ninetechgruppen.se> wrote in message
news:3c72022e_2@dnews...

0 new messages