locked
Alert when new program is installed RRS feed

  • Question

  • Hi

    I need to develop a small program which will send an instant message whenever a program is installed on the machine.

    I know how to send the instant message.

    But don't know how to get the alert when a new program gets installed.

    Any idea how to do it?

    Thanks.
    Kluso
    Thursday, May 10, 2007 5:36 PM

Answers

  • One idea (maybe not the best one) is to count how many subkeys exist under:

    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

     

    But I haven't done the research to know exactly what gets added to the registry here.  This might make the assumption that the software was installed for all users and/or that the setup added an entry to the add/remove programs.

     

    I'd be interested to know if anyone has a better solution...

    Friday, May 11, 2007 3:50 PM

All replies

  • One idea (maybe not the best one) is to count how many subkeys exist under:

    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

     

    But I haven't done the research to know exactly what gets added to the registry here.  This might make the assumption that the software was installed for all users and/or that the setup added an entry to the add/remove programs.

     

    I'd be interested to know if anyone has a better solution...

    Friday, May 11, 2007 3:50 PM
  • Kluso, while it's possible to detect whether a program you're interested in has been installed, I'm not aware of any OS hooks that will let you detect that a generic program has just been installed. You could monitor the registry as another poster has suggested; that's really the best answer that I can think of, I'm afraid. If you decide to go that route, you will probably need to do more than monitor the number of keys; you'll need to keep track of which keys exist.
    Wednesday, May 16, 2007 7:31 PM
    Moderator