This hack will create a custom folder—like the special My Documents folder—and one that cannot be deleted or renamed!
Navigate to:
HCR\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 when required for a Registry entry. Examples of GUIDs are:
{25892e17-80f6-415f-9c65-7395632f0223}
{a53e98e4-0197-4513-be6d-49836e406aaa}
{e33898de-6302-4756-8f0c-5f6c5218e02e}
These GUIDs should only be used on personal machines as their uniqueness cannot be guaranteed. GUIDs are usually generated by Windows, and not manually entered as we’re doing here. If the GUID is distributed in runtime apps, there is the probability— however remote—of it clashing with the existing GUIDs.
For this example, we’ll use a random GUID:
{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}.
Hence, the key value will be:
HCR\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Set the value of the “(Default)” setting for this key to the name of the folder—say “Computer Gurus Archive”. Create a new sub-key under the main key and call it “DefaultIcon”. That is, create a key called:
HCR\CLSID\{FD4DF9E0-E3DE-11CE
-BFCF-ABCD1DE12345}\DefaultIcon
Set the value of the “(Default)” setting to the filename and path of the icon file you want to use for this folder. For example, “C:\Computer Gurusicon.ico”, without the quotes. If you don’t specify a path to an icon file, Windows will use its default folder icon.
Create another sub-key under the main key called
“InProcServer32”, that is, create the key called:
HCR\CLSID\{FD4DF9E0-E3DE–11CE-
BFCF-ABCD1DE12345}\InProcServer32
Set the “(Default)” setting here to “shell32.dll”. Create another String Value called ThreadingModel, with the value set to “Apartment”.
There’s more! Create another sub-key called
HCR\CLSID\{FD4DF9E0-E3DE-11CE-BFCF–
ABCD1DE12345}\Shell\Open My Folder\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:\Computer Gurus Archive”
Create another set of sub-keys called
HCR\CLSID\{FD4DF9E0-E3DE-11CE-BFCF
-ABCD1DE12345}\ShellEx\PropertySheetHandlers\
{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}
Then create another sub-key called
HCR\CLSID\{FD4DF9E0-E3DE-11CE-BFCF
-ABCD1DE12345}\ShellFolder
Under this key, create a new Binary Value called Attributes with the value “00 00 00 00”.
To put the folder on the Desktop, add the following key:
HLM\SOFTWARE\Microsoft\Windows\
CurrentVersion\Explorer\Desktop\NameSpace\
{FD4DF9E0-E3DE-11CE-BFCFABCD1DE12345}
To place the folder in My Computer, add the following key:
HLM\SOFTWARE\Microsoft\Windows\
CurrentVersion\Explorer\MyComputer\NameSpace\
{FD4DF9E0-E3DE-11CEBFCF-ABCD1DE12345}
The folder cannot now be removed or renamed without reversing the above steps.