[Perl] run a program in windows

Sibony, Rony Rony.Sibony at comverse.com
Tue Feb 19 05:51:51 PST 2002


I tried this -

system ("C:\\Program Files\\Windows Media Player\\wmplayer.exe"
"\c:\\my_music_file.mp3"");

but this one dose'nt working it came out with the error
'c:\Program' is not recognized as an internal or external command,
operable program or batch file.

Rony Sibony
+972-51-232031
+972-3-6452031
 


-----Original Message-----
From: Nimster [mailto:nimster at netvision.net.il]
Sent: Tuesday, February 19, 2002 12:59 PM
To: perl at perl.org.il
Subject: Re: [Perl] run a program in windows


>
> Hi All
>

Greetings.

>
>
> I'm a Unix developer so I'm not familiar with perl on windows.
>
> Maybe someone know how to activate the media player with a special file
that
> contain a voice message during the perl script
>

Quite simply, actually. Do a system call for C:\Program Files\Windows Media
Player\wmplayer.exe "path\to\file".
This is the default installation path for WMP. Maybe a registery or
enviroment variable holds the path for every machine, but I do not know of
one.

>
> Rony Sibony
> +972-51-232031
> +972-3-6452031
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://www.perl.org.il/cgi/listinfo/perl

_______________________________________________
Perl mailing list
Perl at perl.org.il
http://www.perl.org.il/cgi/listinfo/perl



More information about the Perl mailing list