用批处理文件播放声音 [英] Play sounds with a batch file

查看:863
本文介绍了用批处理文件播放声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用批处理文件播放声音或音乐文件,但是我不希望Windows显示音乐播放器中的窗口. 所以我想在后台播放声音... 我希望你能帮助我:D

I want to play a sound or music file with Batch files, but I don't want that Windows show the window from the music player. So I want to play a sound in the background... I hope you can help me :D

推荐答案

以下是几个脚本.

mediarunner.bat -它使用Windows Media Player的活动x对象,因此,如果没有安装Windows Media Player(通常是Windows附带的),则不能使用.仅接受一个参数-要播放的文件的路径.

mediarunner.bat - it uses windows media player active x objects so you cannot used if there's no installed Windows Media Player (though it usually comes packed with the Windows).Accepts only one argument - the path to the file you want to play.

spplayer.bat -使用SP Voice对象,但只能播放.wav文件.同样,它仅接受要播放的文件的路径作为参数.

spplayer.bat - uses SP Voice objects but can play only .wav files.Again it accepts as only argument the path to the file you want to play.

soundplayer.bat -使用只能在Internet Explorer中使用的Internet Explorer对象和特定的bgsound标记.可以播放.mp3,wav,..文件.它可以接受两个参数.您要播放的文件和音量(介于-10000到0之间的数字):

soundplayer.bat - uses Internet Explorer objects and specific bgsound tag that can be used only in internet explorer.Can play .mp3,wav,.. files. It can accepts two arguments. The file you want to play and the sound volume (a number between -10000 to 0) :

 call soundplayer.bat "C:\Windows\Media\Windows Navigation Start.wav" 0

这篇关于用批处理文件播放声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆