PlaySound in Windows Service

  • Thread starter Thread starter CKKwan
  • Start date Start date
C

CKKwan

I can do this in XP, if the Windows Service is log on using a valid
user account.

But cannot get this to work in Vista.

May I know what is missing?

TIA.
 
1st, user need this application running without logon to Windows.
2nd, this application will continuously monitor event and boardcast
via speaker (something like what you heard in Airport terminal).
 
1st, user need this application running without logon to Windows.
2nd, this application will continuously monitor event and boardcast
via speaker (something like what you heard in Airport terminal).

Is "Don't use Vista" an option?
 
Unfortunately no. Because this is a new system, and they are planing
to migrate all systems to Vista. This is the second application.

If don't use Vista is an option, then I lose my job already.
 
Hi,

Usually to build something that interacts with the desktop, you need
to split things into two; the background service, which is always
running and monitoring whatever, and a desktop application (which
could just be a tray application or maybe no UI at all) that connects
to the service. When the service sees something "interesting" it can
broadcast to any listening application. The desktop upon hearing that
something interesting happened can then play the sound.

Of course you must be logged on for this to work; I don't think
there's any way to play sounds when not logged on (well, not that you
could do.. MS likely has ways for the logon program to do this).
 
Back
Top