Microsoft KB Archive/255584
INFO: PlaySound May Succeed But Not Play a Sound from a Service
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), included with:
- Microsoft Windows NT Server version 4.0
- Microsoft Windows NT Workstation version 4.0
When you are using the PlaySound function from a service that is configured for the localsystem account, it may fail to play a sound although the same code works from an interactive user.
The PlaySound function refers to the following registry key to determine the sound card to play the sound file:
The Playback value specifies the sound card.
HKEY_CURRENT_USER is a mapping of the user's profile, which is loaded under HKEY_USERS. A service that is configured for the localsystem account does not have a profile, and therefore any references to HKEY_CURRENT_USER refer to HKEY_USERS\.default. The registry settings may be different from the interactive user's profile. The Playback value should match for both registry keys.
Additional query words:
Keywords : kbOSWinNT400 kbDSupport
Issue type : kbinfo
Technology : kbAudDeveloper kbWin32sSearch kbWin32API
Last Reviewed: October 27, 2000