Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Running a program/command when USB device comes online

15 Jun 2015   #1

Windows 7 Ultimate x64
Running a program/command when USB device comes online

Some USB devices automatically start their associated command/program whenever the device comes online. An example is my TomTom SatNav; I connect it to my PC (via a USB port) and the "TomTom HOME 2" program starts automatically.

Is there a way that I can start a program for a device which doesn't have this facility? I'm thinking about my Panasonic FZ28 camera. When I connect it to my PC, I get the extra extra drive (F: in this case) but it would be handy if I could arrange for my Image Software to start.

My System SpecsSystem Spec
15 Jun 2015   #2

Windows 7 Ultimate x64 SP1

My System SpecsSystem Spec
16 Jun 2015   #3

Windows 7 Ultimate x64

Thanks for the suggestion, but it's not a file association (or autoplay for media type) that I'm looking for. The USB devices that interest me may appear as a new device/drive, but this is not always the case.

When a USB device comes online, you get the "Device Connect" sound. What I'm looking for is some way of executing a script when the device connects.

I suspect I can use the "On an event" trigger in Scheduled Tasks, I just have to work out which log/source/eventID to use. I'm presuming that Windows 7 creates a log event when a USB device connects...
My System SpecsSystem Spec

16 Jun 2015   #4

Win 7 Home Premium 64-bit

Explore this:

USB Drive Letter Manager - USBDLM

It does a LOT more than manage usb drive letters, it has dozens of functions that can be enabled thru .ini file.
My System SpecsSystem Spec
16 Jun 2015   #5

Windows 7 Ultimate x64

Aha! I had USBDLM a few years ago when I was still working. I never had enough time to get to grips with it, and forgot about it.
Now I'm retired, it will probably be exactly what I need.
My System SpecsSystem Spec

 Running a program/command when USB device comes online

Thread Tools

Similar help and support threads
Thread Forum
Command Prompt Can't see my device
Command Prompt Can't see my device
Hardware & Devices
BSOD when playing Command & Conquer Tiberium Alliances online game
First of all, I've been getting these bsod's like 3-5 times, and I have just a 4 week old computer. My friend has helped me with them and we have fixed all the problems ( mostly driver problems ). My friend isn't available at the moment so I turned to you guys. So I was playing the browser...
BSOD Help and Support
Trigger for when Device comes online
Is there a trigger that I can use for the Win7 Scheduler that will trigger a task when another computer comes online? That is, instead of me having a batch file constantly pinging a particular IP on my local network to see if a device is online, could I create a trigger instead?
General Discussion
Running command prompt commands elsewhere...
I am trying to configure RightMark Clock Utility to execute the "start" command when the power source for my computer changes. For example, I would want to run this: start /MIN "" "C:Path\to\Program" I am choosing the start command because it gives me the option to use the /min parameter. ...
General Discussion
Have key command open a program?
Is there a way to make a key combo open a program? I want Ctrl+Window Key+Escape to enter a program i downloaded that is similar to the OS X force quit program. It would be useful.

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 03:00.
Twitter Facebook Google+