tags:

views:

54

answers:

2

I need to write a batch file to set the system environmental variables as shown below

WRD_WF_ROOT=e:\wrd_ntl_v23
WRD_Wld_ROOT=e:\wrd_ntl_v23

and I need to run the script for 250 users .

A: 

I'm assuming you mean non-volatile system wide variables, if that is the case, you can call reg.exe and add your entries to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment (reg.exe is available by default on WinXP+)

To execute things on remote machines, psexec is your friend.

Anders
A: 

I think you are looking for setx, it is like a normal set but it survives after your computer restarts.

Francisco Garcia