Michael
Fri Aug 22 12:23:52 CDT 2003
Aaron Neunz wrote:
> Hello,
>
> I need to create a new environment variable on approx 50 2000/XP
> machines on my network. The system variable (not user variable) is
> called LANID and variable value is WRKSTN# . I know of the resource
> kit utility setx but do not think that works remotely. Instead of
> writing 50 batch files like this:
>
> setx lanid wrkstn# -m
>
> (# is taken from the numerical portion of the computer's network name:
> SCBOE01...SCBOE02....SCBOE03...and so on)
>
> Does someone know of an easier method?
>
SYSTEM environment variables are named registry values under the key
HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Control
\Session Manager
\Environment
You could use any number of remote registry tools (such as WMI's StdRegProv)
to write the new named value directly to the registry of each remote client
machine.
--
Michael Harris
Microsoft.MVP.Scripting
Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp
System Administration Scripting Guide - samples scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942
WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en