Solved

NT Service and MessageBeep()

Posted on 1998-11-11
1
360 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Does Microsoft Office 2016 support COM/ActiveX? 3 86
Problem to DocumentFormat 8 75
Explain Unit of Work pattern 2 59
Is COM supported from Apache 1 44
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now