0

When i open the registry "Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" under HKEY_CURRENT_USER some names are normal strings like "AppData", "Desktop","My Music" etc. and some other are in hex format like "{374DE290-123F-4565-9164-39C4925E467B}" which represents the Downloads folder. is there difference in these kind of naming? what is the advantage of giving such names instead for downloads? how do i construct such names?

1

Numbers like that (that length, with hyphens) are called a GUID. The folders you're looking at are special folders recognized by Windows.

Documentation: MSDN: Known Folder ID

is there difference in these kind of naming?

The biggest one I can readily think of is described by the next question's answer:

what is the advantage of giving such names instead for downloads?

Multi-languages. The Downloads folder can be {374DE290-123F-4565-9164-39C4925E467B} on both English releases of Microsoft Windows (which is probably what Microsoft tends to favor during development), and other languages.

By making the code rely on something like 374DE290-123F-4565-9164-39C4925E467B, then multi-lingual support is the simple matter of converting 374DE290-123F-4565-9164-39C4925E467B into the word "downloads" in whatever language a copy of Windows is designed to use. The idea is to help Microsoft separate the name of the folder (e.g., "Downloads" in English) from the logic used with behaviors related to this folder (which is primarily using 374DE290-123F-4565-9164-39C4925E467B). When programmers are separating such things, multi-lingual functionality ends up being easier to create/support.

how do i construct such names?

See: Microsoft Blog: How to Land a Job at Microsoft

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.