Most administrators should be familiar with environment variables, which let you refer to areas such as the system directory without having to hard-code it. For instance, the environment variable %SystemRoot% refers to whatever the current system directory is -- usually C:\Windows, but by using the environment variable you can refer to it no matter where it actually resides. Unfortunately, environment variables are limited in their flexibility, only refer to a small range of system objects, and they can't be used in many contexts.
EnvRep 2.2, from Outside the Box, is a freeware utility designed to help overcome some of the limitations of environment variables. When supplied with a source file, EnvRep 2.2 replaces specially designated variables in the source file with real-time data that can then be piped to a new file. The resulting file can be run as a batch file or used in a log operation or as part of a report. Or, you can put it to a number of other uses.
Many of the variables supported by EnvRep are exclusive to the program and aren't supported as environment variables in Windows by default. For instance, the variable #APPDATA# is replaced with the path to the currently logged-in user's Application Data folder. #CLIPBOARD# is replaced by any text data currently on the clipboard and #DESKTOP# returns the path to the current user's Desktop. Input files can be ASCII or UTF-8, but clipboard text data in non-ASCII format is generally not recognized.
Along with the program, you get the full list of some forty or more custom environment variables. Running envrep /l from the command line gives you a list all the variables available. Existing system environment variables can also be used, whether defined by the system or by the user beforehand.
Serdar Yegulalp is editor of the Windows Power Users Newsletter. Check it out for the latest advice and musings on the world of Windows network administrators -- and please share your thoughts as well!
More information from SearchWinSystems.com
- Tip: 15 admin tools you can't live without!
- Topic: Research Desktop Management in this topic section
- RSS: Sign up for our RSS feed to receive expert advice everyday