You actually can use environment variables in the registry. Make the registry value have a type of REG_EXPAND_SZ. Can't do that with REGEDIT.EXE but you can with REGEDT32.EXE. As far as doing it with REG or INF files, you can do it with REG files but its less than desirable considering it shows up as hex and isn't exactly human readable. That's why I prefer to use INF's if I have to use an environment variable. Example: HKCR,"CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}","LocalizedString",0x00020000,"%USERNAME% / %COMPUTERNAME%" 0x00020000 is REG_EXPAND_SZ This will store, literally, "%USERNAME%" and "%COMPUTERNAME%" and won't expand them until they are actually used. And if you were wondering, that entry I used as an example will display the current username and computername as the text for the "My Computer" icon rather than just saying "My Computer" Hope this helps.