JSI Tip 4928. SETENV.EXE is a freeware replacement for SETX.EXE, and it has more functionality.
March 5, 2002
"SETENV.EXE (for NT, Intel) offers greater functionality thanthe ResKit's command-line utility SETX.EXE in viewing and manipulatingthe WindowsNT "master" environments. By accessing either "HKEY_CURRENT_USEREnvironment"or "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment"("user" or "machine" environment) SETENV will display an entire environmentor the value of a single variable, set or change the value of a singlevariable, or delete a variable. [*New: support (-v) for the "volatile"environment; see below.] Upon successfully making changes to an environment,SETENV calls "RegFlushKey" to ensure that the changes are written to diskimmediately, and then calls "BroadcastSystemMessage" to inform all (interested)components that a change to the environment has been made. EXPLORER (andnot many other programs) acts on this message by updating its environment."BroadcastSystemMessage" is an improvement over "SendMessageTimeout" whichis apparently used by SETX as well as the MyComputerPropertiesEnvironmentpage; "SendMessageTimeout" can fail if EXPLORER is running as a separateprocess from the TaskBar/Desktop (see the Knowledge Base's Q104011) and,at the moment, has no windows open to process the message. SETENV's syntaxmessage (which will be displayed if an otherwise invalid syntax is used)appears below. Get SETENV.EXE byanonymous FTP."
About the Author
You May Also Like