Autorun program on connecting Arduino

Is there a way to run a program (exe, PureData, perl script, etc.) automatically when Arduino Uno is connected to the computer? It does not have to be ready at once, I just want it to wait for Arduino serial data... And I'd rather not run it all the time.

Operating system?

Silly me... Windows 7 Ultimate.

most manufacturers of non-storage devices create an app that wait for WM_DEVICECHANGE notifications from the shell, and react to that in a hidden, top level window. Often they are started at startup using the RunOne registry key(boo!) or service(yaaa!), and sit in the system tray (Logitech Remotes for example...) and do nothing until they get that message in their message queue that their device has arrived.

see Detecting Media Insertion or Removal - Win32 apps | Microsoft Learn for an example and more info on what the heck that is...

If you are building the device diver you can alter the INF to launch a specialised device coinstaller to do some things when the device driver is installed automatically, but I think it only launches the first time the device driver is inserted [for the first time]. If you unplug that device and plug it in again, no co-installer actions are executed. (I have to check on that, don't flog me if that isn't totally true.)

I will be logging Arduino data with a computer which is a bit inaccessible (no keyboard or mouse - HTPC hoping to be home-automation node). I guess I will be running the app all the time then and react on the serial data (probably with an EventGhost serial plugin, as EG is running there anyway)... Might complicate a thing a bit (as I would like to separate the sessions), but probably will be the easiest route.

I made a program but I need to run it automatically once Arduino is connected to PC , without running it first on IDE

I made a program but I need to run it automatically once Arduino is connected to PC , without running it first on IDE

This does not make sense, since you do not run programs using the IDE. You develop, compile, link, and upload programs using the IDE.

The program then runs as soon as the Arduino gets reset/powered up.