Re: How can I force registry update in Windows Server 2003
On Tue, 20 Dec 2005 12:05:02 -0800, "Windows 2K3 User" <Windows 2K3 User@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>Hello, everyone.
>
>I'm adding a key to [HKEY_CURRENT_USER\Environment to create an user
>environment variable using a logon script.
>
>I found out that the registry key does not take effect right away in the
>same session.
>
>I need to force the registry to update and make it avaiable to the current
>user in the same session without having to log out and log back in.
>
>Reg.exe does not seem to have the update option
>
>Thanks.
See tip 4928 » SETENV.EXE is a freeware replacement for SETX.EXE, and it has more functionality.
in the 'Tips & Tricks' at
http://www.jsifaq.com
Place it in the logon share on each DC, so you script can addresses it as %LOGONSERVER%\NETLOGON\SETENV.EXE
Asssume you were trying to set user environment variable ZZZ to This is %username%
set ZZZ=This is %username%
%LOGONSERVER%\NETLOGON\SETENV.EXE -u ZZZ "%ZZZ%"
Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
.
Relevant Pages
- Re: TS Detection During Logon
... Better and easier: use the logon script processor Kixtart (http:// ... where <username> is replaced by the user name of the person logging on. ... This is the current user session. ... (microsoft.public.windows.terminal_services) - Re: Adding key by logon script
... > I'm having a problem adding a registry key by logon script. ... > The script loads a .reg file however it doesn't replace the ... > %USERNAME% variable with the actual username but instead uses ... (microsoft.public.win2000.registry) - Re: What is the function/purpose of the Terminal ServicesSysprocs registry entry?
... When you specify intial program for your session, your session exits when your initial app and all the processes that are running in your session exit. ... All these processes are listed under Terminal Server\Sysprocs registry key. ... Your session started with intial program would terminate when all the processes except the ones listed here are terminated. ... (microsoft.public.windows.terminal_services) - Re: Logon scripts not working with VPN
... Session was already created when you logged on using the local acount, ... there is no readon for the logon script to run. ... Some VPN clients can be configured to run as a "service", ... If you logon remotely to a computer (e.g. user Remote Desktop connection), ... (microsoft.public.win2000.group_policy) - Re: What is the function/purpose of the Terminal ServicesSysprocs registry entry?
... registry key has exactly the same function as the ... When you specify intial program for your session, ... session exits when your initial app and all the processes that ... program would terminate when all the processes except the ones ... (microsoft.public.windows.terminal_services) |
|