Preventing explorer to open a folder

0

I was trying to make a folder inaccessible (Windows 7, 64bit) and I have done the following registry edit:

HKCR\CLSID\{myClsid}
HKCR\CLSID\{myClsid}\shell\open
HKCR\CLSID\{myClsid}\shell\explore
HKCR\CLSID\{myClsid}\shell\opennewwindow
HKCR\CLSID\{myClsid}\shell\opennewprocess

The keys 'open','explore' and 'opennewwindow' doesn't have any command sub key, and the default values are empty.

I renamed a folder TestFolder as TestFolder.{myClsid} and now when I double clicked the folder or select 'Open', 'Explore', 'Open in new window' or 'Open in new process' from the context menu, Windows shows an error message saying that Windows cannot perform the action as there is no program associated with it. And this is the thing I wanted. But When I typed the path in the address ber at the top as path/to/TestFolder, or select the folder from the tree in the left pane, it is opening.

So I'll be glad to know if there is any way to prevent it.

Thanks,

Note: This is not at all a method to secure a folder. The contents of the folder can still be available. I just wanted to know, is there any way to completely break explorer's ability to open the folder.

Dipto

Posted 2013-01-31T09:07:36.957

Reputation: 101

Answers

1

Would you not be better off changing the folder permissions to only allow your user access to the folder.

What you are trying to do above wont actually stop someone getting to the files contained with in the folder, all you are doing is breaking explorer's ability to open the folder.

To set file permissions, right click the folder, then on the security tab click edit.

One thing to note, is that a user with local admin rights WILL always be able to take ownership of the folder to grant themselves access.

If you are trying to hide something, from other admins, you will need to do something else, maybe directory encryption (note that if an admin forces ownership on an encrypted folder, you will lose access to the data)

Steve

Posted 2013-01-31T09:07:36.957

Reputation: 462

Thank you for your answer @steve. I know this wont actually stop someone getting the files contained within the folder. I can change the ACL and permissions anyway. However, I would still like know if there is any way to completely break explorer's ability to open the folder. – Dipto – 2013-01-31T10:27:54.997

1Possibly, but i wouldnt know where to start, it would involve some nasty hacks, which could damage the stability of the machine. another option might be to use a truecrypt container, this will just show as a file unless you know how to decrypt it. – Steve – 2013-01-31T10:34:04.850