I am working on setting up a script to push a new software package to about 400 users. Unfortunately the software is overwriting the envirorment path on some NT 4.0 machines. I have tried the following solution:
Before Installation begins this staement runs.

$path = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment","Path")

After installation completes I use this statement to restore the path.

WriteValue ("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment","Path","c:\program files\sbaremotesystem\bin;$path","REG_SZ")

This is working spuratically on test machines. On some I am getting the stored path plus the additional statement but on others I am getting a path statement that reads:

c:\program files\sbaremotesystem\bin;$path

Is there something I am missing in the syntax?


_________________________
I haven't failed. I just found another way that did not work.