Need a script to add an Environmental Variable per System Context
Hi folks,
first of all sorry to ask this question, I searched online (Hey Scripting Guy blog n etc...) got some scripts but not sure whether to use them or not, thats why concerning the experts to get the script what they are using?? {I am not using any tool for this package thats y}
I want to add a System Environmental Variable (NOT USER) please provide any good script which do not effect my environment in a bad way...
TYI
Answers (1)
start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v LSFORCEHOST /d "MS-VDF.TMCCACAD.TMCC.EDU" /f start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v MINITAB_LICENSE_FILE /d "@\\dr-vdf.TMCCACAD.TMCC.EDU" /f
poke the registry
start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v LSFORCEHOST /d "MS-VDF.TMCCACAD.TMCC.EDU" /f
start /wait reg.exe add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v MINITAB_LICENSE_FILE /d "@\\dr-vdf.TMCCACAD.TMCC.EDU" /f
Comments:
-
Thanks a lot, this is perfect - srikanth.deep 12 years ago