How can I pass a percent sign (%) value to reg.exe?
John Savill
May 21, 2003
1 Min Read
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 HKLMSoftwaresav /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.
About the Author
Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
You May Also Like