Solved

NT Service and MessageBeep()

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

18 Experts available now in Live!

Get 1:1 Help Now