AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autorun a script

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TeeTwo



Joined: 29 Dec 2006
Posts: 123
Location: Australia

PostPosted: Thu May 22, 2008 1:15 am    Post subject: Autorun a script Reply with quote

I have a autorun.inf script that works that brings up the CD type window when a USB memory stick is inserted. I then have the choice to run the script or not by clicking on ok or cancel.
My question is. Can the script be activated automaticly opon insertion without actually having to click on OK.

Thanks in advance
Terry
_________________
(The guy from Oz)
Back to top
View user's profile Send private message
purloinedheart



Joined: 04 Apr 2008
Posts: 537
Location: Canada

PostPosted: Thu May 22, 2008 1:21 am    Post subject: Reply with quote

On your computer - Possibly with some modifications.
On other people's computers - No
Back to top
View user's profile Send private message
TeeTwo



Joined: 29 Dec 2006
Posts: 123
Location: Australia

PostPosted: Thu May 22, 2008 6:12 am    Post subject: Reply with quote

The thing is when you get a cover disk from a magazine and you insert the cd the webbrowser runs. When I look at the Autorun.inf file it calls Boot.exe a executable that gets Windows to run the Browser and load the page.

I can do that with a shellexecute command but I cannot get that command to activate automaticly even if I compile it.

I cannot see the difference between a flash drive and a cd. I have a flash drive acting like a cd with the Autorun.inf.

I was hoping for a AHK script before resorting to a API. and conversion of VB to the basic I use.
I can create programs that reside on a computer and recognise the insertion of a drive and run the executable that way, but I want it to be activated by insertion of the USB Key alone.

Terry
_________________
(The guy from Oz)
Back to top
View user's profile Send private message
JoeSchmoe



Joined: 17 Feb 2008
Posts: 303

PostPosted: Wed Jul 09, 2008 12:12 pm    Post subject: Reply with quote

I've been looking into this a lot myself. I can't see a difference between a USB flash drive and a CD either, but apparently they can. By default, you can have a program autorun off of a CD without any user interaction, but the user needs to confirm with a USB flash drive. Most likely the historical difference is due only to Microsoft becoming more and more aware of security concerns rather than any logic regarding the difference between the types of media.

http://www.samlogic.net/articles/autorun-usb-flash-drive.htm
(Particularly the section entitled "Using AutoRun with USB flash drives")

That being said, I've modified my flash drive to have it run my standard, "always running," autohotkey script when I insert my USB flash drive, and it makes every computer feel like it is my own computer (awww, how sweet! ... It's true, though).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group