I recently had my usb drive stolen and i never got it back. This time around Im making an application that runs when the drive is plugged into a comp. It will then check to see if the computer is on the list of accepted comps and if not it will ask for a password. I need to make it so that the user can do nothing else but put in the password. Ctrl+Alt+Del and Alt+Tab will be disabled and the user will see nothing but the input box. I first tried this by editing the registry to not start up explorer.exe and then killing explorer. But that only works on administrator computers. How would i go about doing this in a way that would work on any account type? Thank you in advance.

PS: Im not too worried about the blocking commands and auto-run features at the moment, just the login part. i tried just killing explorer, but it would come back.

Edited 7 Years Ago by echo off: n/a

you can buy secure pen drives...they have the security built in and i've seen some that destroy data if an attempt is made to forcably bypass the security.
Sometimes its better not to re-invent the wheel ;)

@sknake: Ill worry about that later.
@Ryshad: Im sure it is, but then I wont have the satisfaction of making my own.

I totally agree that rolling your own solution is satisfying, thats why i said 'sometimes' :p
The point i was trying to make is that secure pendrives have the security built in so they aren't platform dependant. The security needs to prevent access to your data, but your trying to do that by locking up their system.
I've never done it, but i've done some reading in the past and what you wanna do isnt simple. I wanted to write something similar a couple years ago to stop my housemates from using my PC when i wasnt around. In the end i just set the screen saver to require login when closed...sometimes there's already a wheel that does a good enough job.
I think the problem is that the behaviour your suggesting is the kinda thing that malicious software would attempt to do, so OS's are designed to prevent it. I know i'd be p*ssed if i found out Microsoft had provided a convenient .net API that needed a couple lines of code to lock up my machine and prevent me from terminating a rogue app ;)

Dont get me wrong, im not trying to kill the enterprising spirit :) I wish you luck if you do try this. I was just pointing out that i dont know of a simple or guaranteed way to do what your asking.

Comments
Good addition!

Actually. your best approach is to create a directory on the drive and encrypt that. and write a program that handles the encryption. a well written app could even have that dir appear as the drives root and allow interaction with the contents through explorer.

but seriously. if you really want to protect you data, and not just do something nifty. you are going to have to use hardware encryption. the device itsself will have to handle the encryption.

the way you are going about it will just protect your system if the autorun is enabled on a windows machine with an uptodate .net installation, even then a cleaver user will be able to easily bypass anything you do to attempt to control the system, and vista and win7's User account control will keep you from doing any of that stuff anyway, regardless.

but I digress.

If you really just want to know how to disable windows key shortcuts, just google C# Kiosk mode and you will get the results you need, there are lots of good articles.

This article has been dead for over six months. Start a new discussion instead.