It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

detecting flash drive mounting and running a program

Moderator: dafunkymunky

detecting flash drive mounting and running a program

Postby jrtroberts on Sat Aug 15, 2009 10:02 pm

Hi,

I need to understand how to build a VBScript that will detect when a flash drive is inserted into a Windows XP SP2 system. Once the drive is detected it will automatically search for a .ppt file (power point) and run pptview.exe and open the file in question.

This script will be located in the startup folder and will run until a flash drive is entered and then it should terminate or pause until the flash drive is removed and then start searching again. the second option may be a better choice.

This is for a kiosk to be used at trade shows for a company I am working for. The company wants this to be simple and automated.

Thanks
Joshua
jrtroberts
 
Posts: 2
Joined: Sat Aug 15, 2009 9:51 pm

Re: detecting flash drive mounting and running a program

Postby instinct46 on Sun Aug 16, 2009 3:42 pm

would it not be easier to use an autorun.ini file in the root of the flash drives.
User avatar
instinct46
50+ Club
 
Posts: 90
Joined: Tue Mar 27, 2007 1:07 pm
Location: St Helens, England

Re: detecting flash drive mounting and running a program

Postby jrtroberts on Sun Aug 16, 2009 4:40 pm

that does not work. XPSP2 and beyond add the autorun.inf to the list of options in the autoplay dialog. There is no good way around it because there is not a registry handler for .ppt files, only for video, music, or pictures. So I have to build this program to automate the process. There is not keyboard or mouse on this system so selecting the option out of the autoplay list is not possible.
jrtroberts
 
Posts: 2
Joined: Sat Aug 15, 2009 9:51 pm


Who is online

Users browsing this forum: No registered users and 1 guest