Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want Windows to dial automatically as soon as I insert my modem via USB, but I realize this is a better, more general, more useful, and more interesting question.

How can I get Windows to execute a given command once it finishes installing a device with a given hardware ID?

(I'm guessing this is a Task Scheduler trick. If it is, then great -- this means I can also run the command already elevated.)

share|improve this question
AFAIK Task Scheduler has no event triggers besides time/date. – kagali-san Dec 5 '10 at 16:08
The Task Scheduler that came with Vista or later can "perform an action based on an event that has been logged in an event log", and so on. -- . – William C Dec 5 '10 at 20:11

You might want to look into AutoHotkey. While it is not specifically what you are looking for it can automate all kinds of things on your system. It is a worthwhile investment to learn it.

share|improve this answer
AutoHotkey is not applicable, Laurens. Microsoft already provides a command-line executable for dialing connections, called <code>rasphone</code> . Thanks anyway. – William C Dec 5 '10 at 20:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.