
Introduction
pcset.exe is very similar to Microsoft's resource kit utility setx.exe with regards to create persistent Operating system environmental
variables. (although setx can do more).
System environment variables are stored in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment.
By creating a new value by calling the RegSetValueEx function. To remove a value
we call the RegDeleteValue function.
To effect these settings without logging off, we
broadcast a WM_SETTINGSCHANGE massage to all windows in the system, so that apps
like Control Panel, Task Manager, etc. can perform an Update.
I wrote this utility for two reasons -
- see if I can write
a environment utility to set persistent (system) environment variables. (Microsoft's native set.exe cannot create persistent variables)
- My work ask me to script an remote / automated firewall backup script. - because
clients remote and Checkpoint firewall-1
has not been set up properly - the environment variables are not set at all and
our script reference a %fwdir% variable to see where the firewall is
installed!
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here