locked
System.Media.Beep.Play not working with Windows Service on Windows 7 RRS feed

  • Question

  • Windows Service on Windows 7 is running under session 0 and System.Media.Beep.Play does not work.

    I can use CreateProcessAsUser to launch another process under the current active session.

    But is there a better solution?

    Friday, April 23, 2010 2:21 AM

Answers

  • Hi Morten,

    Thanks for your feedback. I understand there is no desktop for service.

    The problem is our GINA implementation on XP has this feature but there is not something equivalent on Windows 2007.

    It seems the only way is when a user logs on. I can simply either use "Run" or CreateProcessAsUser from the service. 

    Regards,
    Calvin

    • Marked as answer by Harry Zhu Friday, April 30, 2010 2:39 AM
    Friday, April 23, 2010 10:16 PM

All replies

  • Hi Calvin,

    A service does not have a desktop so any user feedback without a user present does not make sense.  Provided a user is present you can tap into his desktop and provide feedback, but the usual way is to have a windows client starting up as the a user logs on.  This client monitors the service and provides feedback to the user.


    ---
    Happy Coding!
    Morten Wennevik [C# MVP]
    Friday, April 23, 2010 6:30 AM
  • Hi Morten,

    Thanks for your feedback. I understand there is no desktop for service.

    The problem is our GINA implementation on XP has this feature but there is not something equivalent on Windows 2007.

    It seems the only way is when a user logs on. I can simply either use "Run" or CreateProcessAsUser from the service. 

    Regards,
    Calvin

    • Marked as answer by Harry Zhu Friday, April 30, 2010 2:39 AM
    Friday, April 23, 2010 10:16 PM