Windows Server - sound question

Asked By someone watching
19-Mar-10 09:31 PM
XP has sound options for 'device connect' and 'device disconnect'. I like it
especially when it triggers for USB devices. Was wondering if there is any
way to add these options to W2K's sound menu. I am thinking there might be
because Norton Utilities (which is installed here) has options of its own in
the menu.

anybody?
Windows Server
(1)
Visual Studio
(1)
XP
(1)
PlaySound
(1)
Doorbell
(1)
Apps
(1)
Theevents
(1)
Addendum
(1)
  Robbie Hatley replied to someone watching
20-Mar-10 10:24 PM
Short answer:  No, you cannot do that.


Complete answer:

Yes, maybe you can do that, but you will have to learn Windows
programming (in C, C++, C#, or Visual-Basic) first.

Software can do sounds because it calls Win2K's API funtion "PlaySound"
in the following dll:

C:\WINNT\system32\winmm.dll

You can find the settings in the registry which list which sounds
can be played when certain programs send certain events:

HKEY_Current_User\AppEvents\Schemes\Apps

You can put entries in there to play certain sounds when certain named
events are sent from certain programs.  For example, you could say:
- play "dingdong.wav" when program aardvark.exe sends event "Doorbell"
- play "screeech.wav" when program barn_owl.exe sends event "Hoot"

This is organized by user, app, event, and sound scheme, in that order,
so the tree really looks more like:

user1
Schemes
Apps
App1
App1Event1
Scheme1
ding.wav
Scheme2
swish.wav
App1Event2
Scheme1
smash.wav
Scheme2
crunch.wav
user2
Schemes
Apps
App1
App1Event1
Scheme1
snivel.wav
Scheme2
simper.wav
App1Event2
Scheme1
whirr.wav
Scheme2
whine.wav

But to send the events, you would  need access to the source code and compiler
used to make the program, and you would  have to speak the language the program
is written in (C, C++, Visual-Basic, or whatever), and be familiar with the
Win32 API for sending sound events to the OS.

To modify Win2K so that it plays certain sounds for certain hardware events,
you would  have to have the Windows 2000 source code.  Bill could give you that...
but then he'd have to kill you.  ;-)

So in short, no, I do not think you can modify Win2K to play certain
sounds when certain events happen, except to the extent that Win2K is
already set-up to play sounds for those events.

But you might be able to write a program that monitors hardware events
such as devices being unplugged, and sends "play sound" messages to
Win2k (via the PlaySound API function) when these hardware events occur.
Unless you are a windows programmer, this is not going to be easy, though:
1. Get Visual Studio.
2. Get Kernigan's "The C Programming Language" and learn C.
3. Get Petzold's "Programming Windows" and learn Win32 programming.
4. Write a program that monitors hardware events and tells windows
to play certain sounds when certain events occur.

Or, you could do it in Visual Basic.  Here is an related article:
http://www.vb6.us/tutorials/playsound-api

As to exactly how to monitor for devices being unplugged, I do not know.
You could try asking in the win32 programming Usenet groups, such as
microsoft.public.win32.programmer

--
Cheers,
Robbie Hatley
lonewolf at well dot com
www dot well dot com slant tilde lonewolf slant
  Robbie Hatley replied to Robbie Hatley
20-Mar-10 10:33 PM
I'd recommended to "Someone Watching":


But on looking in that group, it is not very active.  Another group,
this one much more active, where you can ask about Win32 API issues is:

comp.os.ms-windows.programmer.win32

--
Cheers,
Robbie Hatley
lonewolf at well dot com
www dot well dot com slant tilde lonewolf slant
  someone watching replied to Robbie Hatley
20-Mar-10 11:12 PM
the
events,
that...


Yea, I kinda figured that when I went looking in the registry and saw sounds
listed for events, but that was it. You explained what I figured ... a call
for sound has to be programmed!

Thanks for the explanation!
BTW, glad you figured what was causing all the headaches with your W2k
setup. I went and reconfigured  AGP settings here after reading your post!
  Robbie Hatley replied to someone watching
21-Mar-10 12:05 AM
I suggest you look and see if any programs of that nature
already exist!  Something called "Hardware Event Audible Notifier" or
some such thing.  Look around.  No sense reinventing a wheel.

That failing, if you have free time, why not make it and sell it for
$20 on tucows?  Sure you might have to learn Visual Basic, but what
the heck, it'd improve your resume, and you would  make some ca$h on the side.


Well, actually, I did not.  It went down like this:
1. Robbie has problem.
2. Robbie thinks he is finally fixed problem 'cause it worked for 10 days.
3. Robbie comes here and brags about it.
4. An hour later, problem comes back (again) like a cat that will not stay away.

Sigh.

BUT, something interesting happened tonight....  more on that in
separate post.

--
Cheers,
Robbie Hatley
lonewolf at well dot com
www dot well dot com slant tilde lonewolf slant
Create New Account
help
Windows Server 2008 RTM Date? Windows Server Has an RTM date been set yet for Windows Server 2008? Windows Server Discussions Windows Server 2008 (1) Visual Studio 2008 (1) X64 (1) Hanisco (1) Ryan (1
WSUS with sql server Windows Server Hi I wonder if anyone can advice / explain me if wsus 2.0 work with windows 2003 enterprise server more sql server 2000 or 2005. Links are appreciated. Thanks in Advance Ricky Windows Server Update Services Discussions ISA Server 2004 (1) ISA Server 2006 (1) SQL Server 2005 (1
Server 2000 to Server 2008 NO exchange Windows Server Hello, we are getting a complete new server with server 2008. Our current 2000 Server only does DHCP, Domain control and file sharing. Nothing fancy. What are the steps to to go from 2000. This will be the first time I personally have done a server migration but I've been working with Windows Servers for a long time. Thanks! Windows
DNS problems causing Active Directory to crash Windows Server Hello all, I am attempting a Migration from server 2000 to 2008 with no exchange. I found directions in previous posts and ran into I were using were as follows: Analysis and Suggestions: = = = = = = = = = = = = = = = = = = = = = = = The general steps to migrate from Windows Server 2000 to Windows Server 2008 is almost the same as the steps to migrate from Windows Server 2003 to Windows Server 2008. Scenario: Old server: Windows Server 2000 box New server
Help on figuring out what workload for what server. . . . . Windows Server Ok, this may be long but bear with me. I am at a smallish manufacturing company with about 55-60 users. I am going to tell you my current server configuration first. Server 1: Compaq Proliant ML370 G2 (PIII 1.13 GHZ, 1.5 GB RAM, 6 18 GB SCSI Hard drives, 2 Gigabit NICs Runs: Windows 2000 Server. It is the Domain Controller / GCS. Exchange 2000. File server. Symantec Antivirus Corporate Edition / Symantec System Center. Server 2: Compaq Proliant ML370 G2 (PIII 700