Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi all.
Do anyone knows how to make a simple program that sets at the removable (USB) drive and requires the user password to access its contents? I am looking for a description, manual or example code for C++/C#. It is very necessary for me.

/Edit MG
I've changed your question so that it refers to "Drive", not "Driver". Since it's the second time you post it, and you didn't seem to like my answers on the first post, I suppose that's what you mean.
Edit MG/

/Edit M
I've added the urgentz tag since there are now 2 questions with nearly identical content

/RuslanPan
P.S. Thank you all for your advice. I know about backup, edit the access policy to the drive, and hardware protection. I know that such program exist. But I am looking for a new job and that is a test task. I can not find information about the hooking of access to a removable (USB) drives from the program stored on a disk :(. What to do later I know.
Posted
Updated 27-Apr-10 10:36am
v7

Now we're talking.
1) This thread (and the previous thread) is completely messed up, because you stated you requirements vaguely (drive contents, instead of : one file), with misspelings (driver instead of drive), and the list goes on. When asking questions you should state your final purpose as clearly as possible without pre-conceptions about the technology you want to use or the way you want to go about this. Your final purpose may be unachievable with your preferred technology, or your preferred way, but by putting these in the question, you will only limit people who respond in their creativity. You may get flamed with short abrupt answers (can't be done!), or you may even the attract the ire of short tempered but witty characters, who usually hang around in the Lounge.

2) I'll write a question for you, and you're going to post it in the General IT Issues[^] forum of the CP. (quick answers is really for short directed questions, that don't take a lot of answering time.

3) I'm not going to answer your question. My area of expertise is Systems Programming, and although I know kiddie's stuff like C# and Java (I draw the line at Visual Basic), I think they're for whimps who can't even decode the assembler by putting their ear to the processor and listening for opcodes. I only pounce on questions which contain the word 'driver' (like your first question), or IOCTL, or second-level page table translation with predictive caching.

So here's the question you want to ask:

Caption : Protecting a file on a removable drive.
I would like to find out what is the best way of protecting a file on a removable storage media. Users should be not be able to access/decode the contents without going through through a program, also supplied on the removable media. Autorun solutions and solutions which require elevation and/or installation are acceptable. I've googled possible solutions, but this yields conflicting answers. (and a lot of uninformed chaff)

4) Now I'm going to watch the telly. I still have episodes of House MD which I haven't watched, and it takes a bastard to know one.
 
Share this answer
 
Thank you all for your advices!
P.S. Good luck with House MD, Michel :)
 
Share this answer
 
Why ask again ? Did you think the answer would change ?
 
Share this answer
 
To Eddy Vluggen: First of all, I'm seeking information for learning. I've never wanted to cut/copy anything from another's codes. I've seen some useful articles on this site for couple of times and I thought that somebody will help me.
 
Share this answer
 
Listen, if this is for a job application, then the solution that I gave is the right one. In fact you could give all three alternatives, and they would all be valid depending on circumstances. But they are 'supported' solutions, insofar that they follow the best interests of the end user, and do nothing illegal. In fact for each of those solutions you could get support from Microsoft if anything went wrong.

Now there is a 4th solution, which is the one that Sony relied on a number of years ago to protect it's Audio CD's, and that's installing a rootkit on the usb stick. It's what you refer to as "hooking" the access to the USB. Perfectly illegal, and it could land you in prison. In Sony's case it resulted in huge legal claims, a shot reputation, and a class action suit. This solution relies, however, on having autorun enabled and that's not the case anymore starting with Windows 7 on USB drives (Microsoft grew wiser after the Sony Rootkit).

Could I tell you how to build a rootkit? Sure. Am I going to? Not in a million years.

Now go and take that interview, trust me, you'll shine (Well if you haven't misinterpreted the question, that is). You can mention the rootkit alternative, but believe me, if that's what they want, you should not work for these people.

Want a second opinion? No problem. I'll even direct you to a site dedicated to rootkits. Try you luck there. http://www.rootkit.com/newsread.php?newsid=182[^]
 
Share this answer
 
v2
RuslanPan wrote:
But I am looking for a new job and that is a test task.

For a job application? This isn't something that you can cut/copy from an article, and it's a lousy way of judging candidates.

RuslanPan wrote:
To Eddy Vluggen: First of all, I'm seeking information for learning. I've never wanted to cut/copy anything from another's codes. I've seen some useful articles on this site for couple of times and I thought that somebody will help me.

My apologies, the words "test task" sounded unfair in this context. To make it up;

Your best start would be by creating an application that uses a file on that USB-drive, and protect that. You can create your own file-extension and register your application to launch those, and you could probably open the file automatic when the USB-drive is inserted over the AutoRun.inf file.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900