Enable Delayed Environment Variable Expansion (Windows 2000/XP)
This setting allows you to enable or disable delayed environment variable expansion in the command processor. If this feature is enabled then exclaimation characters can be used to substitute the value of an environment variable at execution time.
![]() | This tweak can be easily applied using WinGuides Tweak Manager. Download a free trial now! |
Open your registry and find the key below.
Create a new DWORD value called "DelayedExpansion" and set it to equal "1" to enabled variable expansion or "0" to disable it.
Delayed expansion will be available the next time the command processor is used. To access variables surround the variable name with exclaimation characters i.e. "!varname!". For example to echo the PATH variable you could use the following command:
echo !path!
| (Default) | REG_SZ | (value not set) | |||
| DelayedExpansion | REG_DWORD | 0x00000001 (1) | |||
| HKEY_CURRENT_USER\Software\Microsoft\Command Processor | ||
Value Name: DelayedExpansion
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disabled, 1 = enabled)
>> Recommended Download - check, repair and optimize your registry now with Registry Mechanic <<
Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.
Last modified: March 8, 2001
















