Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Play a wave file on a remote computer

Status
Not open for further replies.

boden1

Technical User
Sep 30, 2004
7
GB
Hello,

We have some monitoring software on our network that can play a sound when a device goes down. However the sound is played on a machine that sits in the server room, which is no good to anyone. There is an option ot run an external program in the software. Is there anyway to create a script file on the server that will play a wave file on a remote computer?

Many Thanks for any help.
 
It is possible to do this but probably not with VBScript. A simple way to accomplish this with VBS would be the following...

1) Have a "client" script that runs constantly and checks a particular location for a file (simply a do loop with a dir or FSO check for a file (a flag file))
2) On the server computer when the device goes down run a vbscript that writes the flag file to the remote PC via a UNC path using FSO write or file copy.
3) The client script will see that the file is there, play the audio file, then delete the flag file.

HtH,

Rob

-Focus on the solution to the problem, not the obstacles in the way.-
 
Sounds like a joke i was playing on a telephony engineer the other day. Perhaps you could take this and and modify it for your purposes?

i stuck this, together with Wscript and a batch file, along side the nessasary Wav file, and got the Batch file to run it on another machine using PSTools (psexec.exe)

----------

strSoundFile = "E:\road runner.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand = "sndrec32 /play /close " & chr(34) & strSoundFile & chr(34)
objShell.Run strCommand, 0, True

----------

also found it worked perfect when bundling it all together using GCBundler (Google it) and then running the compiled Exe with PSExec.exe to copy itself to the remote, run and then delete itself.

Cheers

Gurner

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top