Registry

This is just a simple question. No coding involved, but it involves the Windows Registry so I put this in the Windows Programming section.

Can you please explain the difference between a string value and an Expandable String Value in the registry?
An expandable string value is a value that contains a path partly specified using one or more environment variables. Example: %ProgramFiles%\Internet Explorer.
Yeah, that's like if you wanted to put the path to a file named UserInfo.dat in the user's profile directory (Usually named C:\Users\UserName under Vista+), then you would put %USERPROFILE%\UserInfo.dat, so the program would retrieve the file for the current user.

But I have one question. When we read the value, wwhat is the text returned ?
Answer 1 : %USERPROFILE%\UserInfo.dat
Answer 2 : Something like C:\Users\Jessy V\UserInfo.dat

Please Answer
It depends on how did you store the value. See remarks here:
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.getvalue.aspx
Topic archived. No new replies allowed.