Batch file/script window minimize

February 26, 2011 at 16:41:55
Specs: Windows XP/Vista
Okay this is actually two questions
How can I have a batch file/script start a program and force it to be minimized when it starts. I am specifically talking about windows media player.
How can I have the batch file/script close that same wmp after it plays the sound.
I have tired the /min and /max commands they do nothing but it is probably because they are for XP and I am using Vista.

See More: Batch file/script window minimize

Report •

February 27, 2011 at 09:40:04
@echo off
start /min wmplayer.exe
ping -w 10000 -n 1 >nul
taskkill /im wmplayer* /f

Above script should do what you r asking.. the time 10000 is the time in milisecond before it closes the wmpplayer. so change the value as per you needs.may be few seconds more than the mp3 file lenth..

Subhash Chandra.

Report •
Related Solutions

Ask Question