sheridand Posted August 14, 2008 Share Posted August 14, 2008 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 More sharing options...
weaponx Posted August 14, 2008 Share Posted August 14, 2008 (edited) There are some examples of this:http://www.autoitscript.com/forum/index.ph...mp;hl=usb++lockhttp://www.autoitscript.com/forum/index.ph...mp;hl=usb++lockhttp://www.autoitscript.com/forum/index.ph...mp;hl=usb++lock Edited August 14, 2008 by weaponx Link to comment Share on other sites More sharing options...
sheridand Posted August 14, 2008 Author Share Posted August 14, 2008 Thanks so much, Guess i should have looked around a bit longer. There are some examples of this:http://www.autoitscript.com/forum/index.ph...mp;hl=usb++lockhttp://www.autoitscript.com/forum/index.ph...mp;hl=usb++lockhttp://www.autoitscript.com/forum/index.ph...mp;hl=usb++lock Link to comment Share on other sites More sharing options...
sheridand Posted August 14, 2008 Author Share Posted August 14, 2008 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 More sharing options...
Legacy99 Posted August 14, 2008 Share Posted August 14, 2008 Maybe this will get you started in the right direction. This guy is using Autoit to display a splash screen for lost USB drives.http://www.dailycupoftech.com/usb-drive-splash-screen/ Link to comment Share on other sites More sharing options...
GEOSoft Posted August 14, 2008 Share Posted August 14, 2008 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 More sharing options...
sheridand Posted August 14, 2008 Author Share Posted August 14, 2008 @Legacy99 the link keeps timing out for me . @GEOSoft I have made the autorun.inf file and stored it on the Flash drive, however, still no go. I will search for that registry change as well. Thanks Link to comment Share on other sites More sharing options...
Legacy99 Posted August 14, 2008 Share Posted August 14, 2008 (edited) 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 August 14, 2008 by Legacy99 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now