Invoking an exe file

E

Eugene Anthony

I tried the code bellow and I am getting an error:


protected void Button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process pProcess = new
System.Diagnostics.Process();
pProcess.StartInfo.FileName = "C:\\Documents and
Settings\\Eugene Anthony\\Desktop\\mplayer\\mencoder.exe -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames MAX.mpg -o
vuurwerk1.flv -of lavf -ovc lavc -oac lavc -lavcopts
vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:
predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate
=56 -srate 22050 -af lavcresample=22050";
pProcess.Start();
}


The error is:
+ $exception {"The system cannot find the file
specified"} System.Exception {System.ComponentModel.Win32Exception}


How do I solve the problem?

Eugene Anthony
 
B

bruce barker

the FileName should just be the filename, not filename and args.

-- bruce (sqlwork.com)
 
E

Eugene Anthony

I tried this:

protected void Button1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process pProcess = new
System.Diagnostics.Process();
pProcess.StartInfo.FileName = "C:\\Documents and
Settings\\Eugene Anthony\\My Documents\\Visual Studio
2005\\WebSites\\WebSite13\\mencoder.exe";
pProcess.StartInfo.Arguments = "-lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames MAX.mpg -o
vuurwerk1.flv -of lavf -ovc lavc -oac lavc -lavcopts
vcodec=flv:vbitrate=500:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:
predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate
=56 -srate 22050 -af lavcresample=22050";
pProcess.Start();
}

No errors but the process does not function.

Eugene Anthony
 

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top