How to play sounds from a batch file

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Hi,

In XP, I could play sounds from within a batch file. How do I do this in
Vista?

For example, the following command line works in XP, but not in Vista:

START/min sndrec32 /play /close %windir%\media\ding.wav

I understand that "soundrecorder.exe" has replaced "sndrec32.exe", but I've
yet to get it to work within a batch file.

Also, I find that Vista still has the %windir%\media\ding.wav file in place,
but it does not play in Vista. The "%windir%\media\Windows Ding.wav" seems
to be the replacement, but that begs the question as to why ding.wav is
installed on Vista if it doesn't work in Vista?
 
Bob said:
Hi,

In XP, I could play sounds from within a batch file. How do I do this in
Vista?

For example, the following command line works in XP, but not in Vista:

START/min sndrec32 /play /close %windir%\media\ding.wav

I understand that "soundrecorder.exe" has replaced "sndrec32.exe", but
I've yet to get it to work within a batch file.

Also, I find that Vista still has the %windir%\media\ding.wav file in
place, but it does not play in Vista. The "%windir%\media\Windows
Ding.wav" seems to be the replacement, but that begs the question as to
why ding.wav is installed on Vista if it doesn't work in Vista?



To begin with it's soundrecorder.exe in Vista :)

Evenso, I can't get it to play anything.
 
Bob said:
Hi,

In XP, I could play sounds from within a batch file. How do I do this in
Vista?

For example, the following command line works in XP, but not in Vista:

START/min sndrec32 /play /close %windir%\media\ding.wav

I understand that "soundrecorder.exe" has replaced "sndrec32.exe", but
I've yet to get it to work within a batch file.

Also, I find that Vista still has the %windir%\media\ding.wav file in
place, but it does not play in Vista. The "%windir%\media\Windows
Ding.wav" seems to be the replacement, but that begs the question as to
why ding.wav is installed on Vista if it doesn't work in Vista?

http://microsoft.blognewschannel.com/archives/2006/05/24/windows-vista-sound-recorder/

From the page:

To get the old recorder to work on Vista, do the following:
1. Copy the %SystemRoot%\System32\sndrec32.exe file from a Windows XP or
Windows 2003 computer that is the same edition as your computer (i.e. 32-bit
or 64-bit) to your Vista machine.
2. Right-Click the file and choose Run as Administrator. (This is required
so that it can write one-time registry entries).
3. Enjoy - from now on you can just double-click that icon and the old app
will work!

ss.
 
Hi Bob,

Thank you for your response.

I agree that we can copy the %SystemRoot%\System32\sndrec32.exe file from a
Windows XP or Windows 2003 computer to a Windows Vista computer, it should
work.

Since the new program "soundrecorder.exe" can only create .wma file and
cannot play them, another workaround is to play .wav file with Windows
Media Player(wmplayer.exe)

For example, we can also use "wmplayer.exe %windir%\media\ding.wav"
command.

Please take your time to have a try. If there is anything unclear, please
feel free to let me know.

Sincerely
Morgan Che
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Dear Bob,

How's everything going?

I'm wondering if the suggestion has helped or if you have any further
questions. Please feel free to respond to the newsgroups if I can assist
further.

Sincerely
Morgan Che
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
--->From: "Bob" <[email protected]>
--->Subject: How to play sounds from a batch file
--->Date: Sat, 15 Dec 2007 07:35:49 -0500
--->Lines: 21
--->Message-ID: <[email protected]>
--->MIME-Version: 1.0
--->Content-Type: text/plain;
---> format=flowed;
---> charset="iso-8859-1";
---> reply-type=original
--->Content-Transfer-Encoding: 7bit
--->X-Priority: 3
--->X-MSMail-Priority: Normal
--->X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
--->X-MS-CommunityGroup-MessageCategory:
{E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
--->X-MS-CommunityGroup-PostID: {41ACC57F-4997-40C0-B264-05AA69F170FE}
--->X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
--->Newsgroups: microsoft.public.windows.vista.general
--->Path: TK2MSFTNGHUB02.phx.gbl
--->Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:220465
--->NNTP-Posting-Host: TK2MSFTNGHUB02.phx.gbl 127.0.0.1
--->X-Tomcat-NG: microsoft.public.windows.vista.general
--->
--->Hi,
--->
--->In XP, I could play sounds from within a batch file. How do I do this
in
--->Vista?
--->
--->For example, the following command line works in XP, but not in Vista:
--->
--->START/min sndrec32 /play /close %windir%\media\ding.wav
--->
--->I understand that "soundrecorder.exe" has replaced "sndrec32.exe", but
I've
--->yet to get it to work within a batch file.
--->
--->Also, I find that Vista still has the %windir%\media\ding.wav file in
place,
--->but it does not play in Vista. The "%windir%\media\Windows Ding.wav"
seems
--->to be the replacement, but that begs the question as to why ding.wav is
--->installed on Vista if it doesn't work in Vista?
--->
--->--
--->Thanks,
--->Bob
--->
--->
 
Hi Morgan,

My Vista Windows Mail failed to download all the prior posts on this thread,
so yours "looked" like the first response. I went to the web and saw your
suggestion and here is what I found.

The following command almost works except that it tends to open wmplayer in
a window (as opposed to minimized as the "start /min" is instructing it to).
Any ideas why the minimized fails more often than not?

START /d "%ProgramFiles%\Windows Media Player" /min wmplayer
"%windir%\media\Windows Ding.wav"
 
Dear Bob,

How are you?

Please refer to the below article, I think it will be helpful for this
issue:

Windows Media Player 11 SDK Command Line Parameters
http://msdn2.microsoft.com/en-us/library/aa386383.aspx

If you need further assistance, please feel free to let me know.

Thanks

Sincerely
Morgan Che
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
--->From: "Bob" <[email protected]>
--->References: <[email protected]>
<[email protected]>
--->In-Reply-To: <[email protected]>
--->Subject: Re: How to play sounds from a batch file
--->Date: Wed, 26 Dec 2007 10:24:14 -0500
--->Lines: 17
--->Message-ID: <[email protected]>
--->MIME-Version: 1.0
--->Content-Type: text/plain;
---> format=flowed;
---> charset="iso-8859-1";
---> reply-type=original
--->Content-Transfer-Encoding: 7bit
--->X-Priority: 3
--->X-MSMail-Priority: Normal
--->X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
--->X-MS-CommunityGroup-PostID: {53D328F2-3BEE-49C6-AF85-DAE73BA89B13}
--->X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
--->X-MS-CommunityGroup-ThreadID: 41ACC57F-4997-40C0-B264-05AA69F170FE
--->X-MS-CommunityGroup-ParentID: 0942723E-1CF8-4C66-84FC-D424F5189305
--->Newsgroups: microsoft.public.windows.vista.general
--->Path: TK2MSFTNGHUB02.phx.gbl
--->Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:225362
--->NNTP-Posting-Host: TK2MSFTNGHUB02.phx.gbl 127.0.0.1
--->X-Tomcat-NG: microsoft.public.windows.vista.general
--->
--->Hi Morgan,
--->
--->My Vista Windows Mail failed to download all the prior posts on this
thread,
--->so yours "looked" like the first response. I went to the web and saw
your
--->suggestion and here is what I found.
--->
--->The following command almost works except that it tends to open
wmplayer in
--->a window (as opposed to minimized as the "start /min" is instructing it
to).
--->Any ideas why the minimized fails more often than not?
--->
--->START /d "%ProgramFiles%\Windows Media Player" /min wmplayer
--->"%windir%\media\Windows Ding.wav"
--->
--->--
--->Thanks,
--->Bob
--->
--->
 
Dear Bob,

How's everything going?

I'm wondering if the suggestion has helped or if you have any further
questions. Please feel free to respond to the newsgroups if I can assist
further.


Sincerely
Morgan Che
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
--->From: "Bob" <[email protected]>
--->Subject: How to play sounds from a batch file
--->Date: Sat, 15 Dec 2007 07:35:49 -0500
--->Lines: 21
--->Message-ID: <[email protected]>
--->MIME-Version: 1.0
--->Content-Type: text/plain;
---> format=flowed;
---> charset="iso-8859-1";
---> reply-type=original
--->Content-Transfer-Encoding: 7bit
--->X-Priority: 3
--->X-MSMail-Priority: Normal
--->X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
--->X-MS-CommunityGroup-MessageCategory:
{E4FCE0A9-75B4-4168-BFF9-16C22D8747EC}
--->X-MS-CommunityGroup-PostID: {41ACC57F-4997-40C0-B264-05AA69F170FE}
--->X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
--->Newsgroups: microsoft.public.windows.vista.general
--->Path: TK2MSFTNGHUB02.phx.gbl
--->Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:220465
--->NNTP-Posting-Host: TK2MSFTNGHUB02.phx.gbl 127.0.0.1
--->X-Tomcat-NG: microsoft.public.windows.vista.general
--->
--->Hi,
--->
--->In XP, I could play sounds from within a batch file. How do I do this
in
--->Vista?
--->
--->For example, the following command line works in XP, but not in Vista:
--->
--->START/min sndrec32 /play /close %windir%\media\ding.wav
--->
--->I understand that "soundrecorder.exe" has replaced "sndrec32.exe", but
I've
--->yet to get it to work within a batch file.
--->
--->Also, I find that Vista still has the %windir%\media\ding.wav file in
place,
--->but it does not play in Vista. The "%windir%\media\Windows Ding.wav"
seems
--->to be the replacement, but that begs the question as to why ding.wav is
--->installed on Vista if it doesn't work in Vista?
--->
--->--
--->Thanks,
--->Bob
--->
--->
 
Back
Top