------------------------------------------------------- MISCELLANEOUS CODE ------------------------------------------------------- BILL BAXTER SEPT 01, 2002 This directory contains several little libraries and utilities that I have written for my own needs. If they're useful to you too, then great. If you'd like to drop me a line, go here: http://www.cs.unc.edu/~baxter/cgi-bin/feedback/emailme.html Disclaimer: Bill Baxter and The University of North Carolina at Chapel Hill make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. REGENV (Cygwin) This is a set of command line tools for use with the CYGWIN UNIX-like environment for Windows (see http://www.cygwin.com). These shell scripts let you change your environment variables from the command line (Windows NT, 2000, XP only). The normal way to change system-wide environment variables is to open up the 'System Properties' control panel, go to 'Advanced', click the 'Environment Variables' tab, click 'New' or 'Edit', type the change to the variable, click 'OK' on the edit dialog, then click 'OK' again on the 'Environment Variables' dialog, and finally click 'OK' one more time on the 'System Properties' dialog. What a pain! With these scripts you can just go to your Cygwin command prompt and type things like: setregenv FOO SomeValue printregenv FOO unsetregenv FOO and the environment variable FOO is modified in the registry, just as if you'd gone through all the steps above with the System Properties panel. Also included are 'unsetregenv' and 'printregenv'. All work more or less like their shell counterparts, 'setenv', 'unsetenv', and 'printenv'. The big difference is that, just like when you use the 'System Properties' panel to set environment variables, most apps have to be restarted in order to see the changes. For the most part the scripts just use the Cygwin Win32 registry modification program 'regtool'. However, regtool doesn't issue the proper command to alert running applications that the registry has changed, so things like the Windows Explorer don't pick up the change normally. To fix that I wrote a one-line program that calls the Win32 command to notify apps. Unfortunately I can't seem to find the source for that program, so the exe is all I've got. Standard disclaimers apply. These scripts change the registry. If the registry gets messed up it can cause Windows to freak out. If that scares you, then don't use these scripts.