Using system() to open a *.mp3 file

Feb 3, 2013 at 11:36pm
I am using to the system() command to open a *.mp3 file I have but when it runs it is run using Windows Media Player so the window pops up in the middle of the screen. Is there any way to keep it minimized?

1
2
3
system("cd C:\Dev-Cpp\8th Grade Project");
system("start SoundTrack.mp3");
getch();

Feb 4, 2013 at 12:30am
Did you look at the help for START?
It shows a /MIN option.


D:\start /?
Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]


So, the following should work:
 
system("start /MIN SoundTrack.mp3");
Feb 4, 2013 at 12:51am
I am still having the same problem D: It doesn't seem to have any effect.
Topic archived. No new replies allowed.