The following registry key contains several system default folder locations.
HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ User Shell Folders
XP or earlier: [%] The value for the path, which is found there, is as follows: ALLUSERSPROFILE% \ Desktop] Vista or later: [% PUBLIC% \ Desktop]
While all users have the actual path of the desktop Respectively are as follows:
XP or earlier: "C: \ Documents and Settings \ All Users \ Desktop \" Vista or later: "C: \ Users \ Universal Nick \ Desktop "
Now, copy If you use and paste the above registry value in Windows Explorer and hit enter it takes you to the actual folders. For example, if you paste [% PUBLIC% \ Desktop] into a Windows Explorer in Vista, then it takes you to ["C: \ Users \ Public \ Desktop"].
My question is this; How can I get this behavior from the C # program? To be more specific, if I'm getting the registry value [% PUBLIC% \ Desktop] from the C # program, which I can easily do, then I call it "[C: \ Users \ Public \ Desktop"] How do I convert? Obviously I'm not looking for a string replacement, I need windows.
Comments
Post a Comment