A. Just as you can use a slash (\) as an escape character to pass a double quote ("), you can use a carat (^) as an escape character to pass a percent sign. For example,
G:\>reg add HKLM\Software\sav /v test /t REG_SZ /d "\"%userprofile^%\""
maintains the user-profile value's percent sign. Without the carat, the reg.exe tool will evaluate the value between the percent signs; with the carat, reg.exe will leave the value unchanged.
5 comments
Hide comments