Monday, April 21, 2008

Create A Special Folder In Windows Explorer

1 comments
We can create a folder like My Documents one that will appear as a system folder in XP by doing the following steps...

1.In the Registry Editor, navigate to HKEY_CLASSES_ROOT\CLSID. Create a new1 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 touniquely identify COM objects. Create a key using this random GUID:{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}

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 “DefaultIcon”. 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 iconfile, Windows will use its default folder icon instead.

3 .Create another sub-key under the main key called “InprocServer32”, that is, create the
key called HKEY_CLASSES_ROOT\CLSID\{FD4DF9E0-E3DE-11CE-BFCF-ABCD1DE12345}\
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-BFCF-ABCD1DE12345}\Shell\
Open MyFolder\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”.

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-BFCF-ABCD1DE12345}\
ShellFolder. Under this key, create a new binary value called“Attributes” with the value
00 00 00 00”.

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!



Comments

1 comments to "Create A Special Folder In Windows Explorer"

Anonymous said...
April 10, 2011 at 11:45 PM

Hi anu,
I was looking for a solution to create a special folder like 'My Documents' in XP when I chanced upon your article. This one is really good. However, I request a few clarifications.
step # 3: subkey... 'Shell\
Open MyFolder\Command' - are these 3 subkeys one underneath other (Shell, Open Myfolder & Command)?

Step # 4: do not understand some part of it. The subkey name after 'PropertySheetHandlers' is same as the first key cretead in step 1.

Could you please clarify these two points. Would it be possible to provide an image of the Registry structure?

Thanks for your help in anticipation.

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com