Problem with running batch wmp minimized

Hello everyone, I am making text based game with batch and I want to make background sound. So I wrote this line "start /min wmplayer.exe "%cd%\bgsound.mp3"" to play that sound with WMP but it doesn't start as minimized. What is the problem and how to fix it? Thanks.

@echo off
color 4
start /min wmplayer.exe "%cd%\bgsound.mp3"

:menu
cls
echo.
echo 1.Start game
echo 2.Exit
choice /c:12 /M "Choose the number of action"
if errorlevel 255 goto menu
if errorlevel 2 goto end
if errorlevel 1 goto game1

:game1
echo IN PROGRESS!

:end
Last edited on
The command "Start" launches another command line window, not another application. The other application is launced because you pass arguments to the new window, but "/min" applies to the command line, not the application it launches. Why don't you try to write this in C\C++?
Last edited on
I have to make it in batch.
Then I'd say that your next step is to find a media player that will run inside of the command line. Being a C\C++ site, most of us would just write this since it's this easy: http://sfml-dev.org/tutorials/2.0/audio-sounds.php so I don't have an application to recommend.
Hi,
you could get the title of the window of wmp and get the handle of it and use ShowWindow()
with SW_HIDE parameter...
or you could try a different player I know one that will do:
UMplayer...
google it and download it!
Topic archived. No new replies allowed.