Forum Home
Press F1
 
Thread ID: 40683 2003-12-14 23:36:00 Folder security trick. b1naryb0y (3) Press F1
Post ID Timestamp Content User
200546 2003-12-14 23:36:00 I've come across a nifty way of protecting folders on computers running Windows XP. This is not dependant on NTFS permissions or seperate user accounts. It is very handy when several people use the same account.

I've written a few very simple batchfiles that demonstrate how this works. Once downloaded please make sure you first read the readme file and have a look at the .bat files to see how it works.

The files can be found Here (homepages.slingshot.co.nz)

If you are super paranoid you should also deny access to the command prompt. You can do this by:

1) click start > run > and type gpedit.msc > then click ok
2) navigate to Local Computer Policy > User Configuration > Administrative
Templates > System
3) Under this tab there is a setting that can be used to prevent
access to cmd.exe, double click on "Prevent access to command prompt"
4) select "enabled" click ok.

Of course anyone with Admin rights can change this setting, so if you are sharing your computer with others, it is recommended that a "limited" account be used for everyday use.
b1naryb0y (3)
200547 2003-12-15 01:47:00 Cool. somebody (208)
200548 2003-12-15 06:15:00 Yes very cool, I can see this becoming very handy. dreamweaver (5003)
200549 2003-12-15 10:22:00 Thanks - it was something I was asking about recently. Look forward to trying it out. Greg S (201)
200550 2003-12-15 11:23:00 I've just uploaded a new version that also hides the protected folder from view. It remains hidden even if "show hidden files and folders" is enabled in the view tab of folder options. b1naryb0y (3)
200551 2003-12-15 11:27:00 Same download location?

homepages.slingshot.co.nz
Greg S (201)
200552 2003-12-15 11:29:00 Yes, same location. b1naryb0y (3)
200553 2003-12-15 19:35:00 Have no idea what to do with it, help please.

I dont really need this but I am curious as it may come in handy later (or may not) but I really want to learn about this sort of stuff.

Now that I have it on my computer in my downloads folder I have a folder called "terp stuff" that is on my desktop (this is going to be my business folder next year) that I want to practice this on.

What do I do now? (n00bie language please)

sam m
sam m (517)
200554 2003-12-15 19:58:00 b1naryb0y, hopefully you don't mind me explaining this.

Basically what happens is the script renames the name of the folder by using the DOS command:

ren folder folder.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}

This is assuming that the name of the original folder is called "folder". In practice, what you could do is simply right click on the folder itself, select "rename", and add
.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}
to the end of your foldername.
for example, your folder could be named: "terp stuff.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}", and theoretically it'd be protected.

To unprotect the folder, you simply remove everything after and including the dot.

To hide the folder, the DOS attrib command is used, where the +r means to make the file read only, the +s means to make it a system file, and +h means to make it hidden from view. The command below (part of the .bat files in the protect.zip download) shows how it is done to the "folder" folder, after it's been protected by adding .{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0} to it.

attrib +r +s +h folder.{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}


What I would do, is to right click and "Edit" "protect.bat", and change any instance of the word "folder" to "terp stuff" (will have to be in speech marks in the actual file). Do the same with the "unprotect.bat" file. Then move both the protect.bat and unprotect.bat files to your desktop, and double click the protect.bat file to protect and hide the folder, and double cli ck unprotect.bat to unhide and unprotect the folder. TRY THIS ON A FOLDER WHICH DOES NOT HAVE IMPORTANT STUFF first, in case something goes wrong.

Bear in mind that anyone who can access the protect.bat and unprotect.bat files will be able to unprotect your folder, so a good idea might be to copy the files to a floppy disk, and only copy them to the desktop to run them.
somebody (208)
200555 2003-12-15 20:02:00 Have a look at the readme file, that should give you some pointers.

Basically, all you have to do is extract the files to the desktop (the files must be in the same location as the folder you are wanting to protect). Then rename your "terp stuff" folder to "folder". Double click on protect.bat and voila.

Put the protect.bat and unprotect.bat files on a floppy so no one has access to them. Then delete those two files from the desktop.

When you want to unprotect your folder, just copy the unprotect.bat from the floppy to the desktop and double click it.

You can name the folder you are wanting to protect something other than "folder", but then you must also edit both of the .bat files. So it is easiest just to leave it as "folder".
b1naryb0y (3)
1 2