I need to write a batch file to set the system environmental variables ,
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 .
I think you are looking for setx, it is like a normal set but it survives after your computer restarts.
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.
精彩评论