AutoHotkey Community

It is currently May 26th, 2012, 7:13 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Autorun a script
PostPosted: May 22nd, 2008, 2:15 am 
Offline

Joined: December 29th, 2006, 6:57 am
Posts: 123
Location: Australia
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2008, 2:21 am 
Offline

Joined: April 4th, 2008, 8:15 pm
Posts: 538
Location: Canada
On your computer - Possibly with some modifications.
On other people's computers - No


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 22nd, 2008, 7:12 am 
Offline

Joined: December 29th, 2006, 6:57 am
Posts: 123
Location: Australia
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2008, 1:12 pm 
Offline

Joined: February 17th, 2008, 5:01 pm
Posts: 303
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/autoru ... -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).


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], bobbysoon, Google [Bot], Google Feedfetcher, kkkddd1 and 68 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group