Re: Resetting PATH (system env.) during startup
From: Jerold Schulman (Jerry_at_jsiinc.com)
Date: 02/10/05
- Next message: Joe: "force logoff workstations a certain time"
- Previous message: hallstein: "Resetting PATH (system env.) during startup"
- In reply to: hallstein: "Resetting PATH (system env.) during startup"
- Next in thread: hallstein: "Re: Resetting PATH (system env.) during startup"
- Reply: hallstein: "Re: Resetting PATH (system env.) during startup"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 10 Feb 2005 10:43:24 -0500
On Thu, 10 Feb 2005 15:03:47 +0100, hallstein <hallstein@online.yahoo.com> wrote:
>I've created a Group Policy (Computer Conf. \ Windows Settings \ Scripts
>\ Startup )
>
>Some computers of mine have been applied a .MSI that destroyed the PATH
>variable, thus some programs stopped working.
>
>------------------------------------------------------------------
>RESETPATH.CMD
>@echo off
>REM Fixes path:
>echo %path% | %windir%\system32\find /I "SYSTEM32" >nul
>IF %errorlevel% == 1 goto setpath
>goto continue
>
>:setpath
>PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;%PATH%
>
>:continue
>REM (Continue startup script)
>------------------------------------------------------------------
>
>However this script does not seem to fix the path variable. Anybody know
>why? is it not allowed to change path from startup scripts?
The above just changes the variable temorarily in the script.
To change it, you must eddit the registry Value Name "PATH"
at the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" sub-key.
You can use reg.exe , built into Windows XP, Windows Server 2003, and later,
or installed from Windows 2000 Support Tools.
or try using FixPath.exe from tip 8368 in the 'Tips & Tricks' at http://www.jsiinc.com
Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
- Next message: Joe: "force logoff workstations a certain time"
- Previous message: hallstein: "Resetting PATH (system env.) during startup"
- In reply to: hallstein: "Resetting PATH (system env.) during startup"
- Next in thread: hallstein: "Re: Resetting PATH (system env.) during startup"
- Reply: hallstein: "Re: Resetting PATH (system env.) during startup"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|