Jump to content
Sign in to follow this  
Solarlight27

Auto Play File upon plugging in a flash drive

Recommended Posts

Solarlight27

What I'm looking for is a script that once I plug in my USB it'll run a script to open multiple programs/folder/files at once or one after the other..

How would I write this code? Any ideas would be great :oops:

Share this post


Link to post
Share on other sites
DW1

I assume the script will be running from the HDD. If that's the case you could have a file on the usb drive that the script looks for, and if the file is found and the content matches what is expected, then your script fires off a function that opens your programs/folders/files.

Another option if you don't want to worry about a file sitting on the drive would be to do this by looking for the device ID of the usb drive. You can find device ID's multiple ways, but if you search for a utility called DevViewer it makes it pretty easy.

Edit:

Reading the thread JLogan3o13 linked, I think my assumption was incorrect:

I assume the script will be running from the HDD.

Edited by danwilli

Share this post


Link to post
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
Sign in to follow this  

×