Jump to content

USB Device


Recommended Posts

Hi everyone! I am new to AutoIT, but so far I am very impressed. Let me start by saying how much I appreciate everyones post on the forum, they have helped me so much.

I am trying to make a program that could be saved to a USB Flash Drive and when the Drive is plugged in, would auto start no user input, just start. The idea would be to have the USB drive be a "Key" and when the drive is in, the computer is able to be used, but when it is removed, the computer is locked, (Blank screen, and no keyboard or mouse inputs). I am not asking for someone to do this for me, just point me to the right direction as far as the Hardware end of the code would go.

Flash Drive Plugged in---- Start program (dont want to install app on any PC just ran off of USB)

Flash Drive removed---- Lock PC

Flash Drive plugged in--- unlock PC

Thanks.

Link to comment
Share on other sites

One more thing, i have looked at all of these solutions, however they lack in that, I need the program to be executed as soon as the USB drive is plugged in. These all required the program to be started by the user. Any ideas on how to get this done?

Link to comment
Share on other sites

One more thing, i have looked at all of these solutions, however they lack in that, I need the program to be executed as soon as the USB drive is plugged in. These all required the program to be started by the user. Any ideas on how to get this done?

I'm not sure but I think there is a registry setting that can be made to allow you to autorun a USB stick using an autorun.inf file. Without the registry change, the closest I can get is to it is this whick still reguires you to press the enter key.

Create an au3 script with a simple message box and name it test.au3. Compile that file to test.exe and place the compiled file on your USB stick.

Create an autorun.inf file with the following;

[autorun]
open=Test.exe
action=Run my test program
icon=test.exe

Place the autorun.inf file on the USB stick. Unplug the stick and then plug it back in to test.

I'll keep looking for that registry change.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

google the url or just go to dailycupoftech.com it's not updated very often, a page or 2 in. It works fine here.

*Edit*

found this link. Good luck with preventing virii from unknown USB drives (lookup usb hacksaw if you do this, you've been warned)

http://www.portablefreeware.com/forums/vie...p;highlight=iso

Edited by Legacy99
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...