Solved

NT Service and MessageBeep()

Posted on 1998-11-11
1
364 Views
Last Modified: 2013-12-03
From an NT Service, is it possible to play one of the standard 'sounds' (configured in the control panel), and if so how?
I am trying to use MessageBeep(MB_OK), but all I get is a simple speaker beep, not the playing of the configured .wav file.
0
Comment
Question by:kfe
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 1415984
Yes, i think it is possible. Like a lot of NT service issues, the problem is that the service is running under teh 'SYSTEM' account, which usually has no sounds configured. The 2 ways to solve this:

1. Set the service to run under a specific account (control panel -> services)

2. Use 'LogonUser()' and 'ImpersonateLoggedOnUser()' to use a specific account and its settings from within the service.
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question