How can you create a folder like My Documents — one that will appear as a system folder in XP?
Here’s how to create a custom folder in My Computer, one that can’t be deleted or renamed.
Step 1
In the Registry Editor, navigate to HKEY_CLASSES_ROOT\CLSID. Create a new key with a Globally Unique Identifier (GUID). The GUID is a 128-bit identifier that is usually generated by Windows. This can
be a random number that is used to uniquely identify COM objects. Create a key using this random GUID:
{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}
Step 2
Set the value of the “(Default)” setting for this key to the name of the folder, say “My Personal Data”. Create a new sub-key under the main key and call it “Default Icon”. That is, create a key called:
HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}\DefaultIcon
Set the value of “(DefaultIcon)”to the filename and path of the icon file you want to use for the folder, for example, “C:\Topsec.ico”, without the quotes. If you don’t specify a path to an icon file, Windows will use its default folder icon instead.
Step 3
Create another sub-key under the main key called “InprocServer32”, that is, create the key called
HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}\InprocServer32 Set the “(default)” setting here to “shell32.dll”. Create another string value called ThreadingModel and set its value to “Apartment”. There’s one more: create another sub-key called HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}\Shell\OpenMyFolder\Command
Set the “(Default)” value here to the command that should be executed when the folder is clicked. In this case, it would be “explorer /root,c:\My Personal Data”.
Step 4
There’s more keys to be created:
HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\ShellEx\
PropertySheetHandlers\{FD4DF9EO-E3DE-11CE-BFCF-ABCD1DE12345} and
HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}\ShellFolder. Under this
key, create a new binary value called “Attributes” with the value “00 00 00 00”.
Step 5
To place the folder in My Computer, add the original key to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\Namespace\
So the key value will be
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\Namespace\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Now go to My Computer, and you’ll see a new custom folder!
ref: Internet
This technique is failing in Windows 7 version.
Hope some workarround is there that will work for Windows 7. Lots of bug in CFileDialog as well.
This tip failed to work on Windows 7 🙁
This is for Windows XP only