im trying to start one process from a webpage and also trying to pass some arguments to that started process..but its not working .here is the code
//CODE
Expand|Select|Wrap|Line Numbers
- string inputfile = @"pdfdoc.pdf";
- string outputfile = @"pdfdoc.swf";
- Process pdf2swfprocess = new Process();
- pdf2swfprocess.StartInfo.UseShellExecute = false;
- pdf2swfprocess.StartInfo.RedirectStandardOutput = true;
- pdf2swfprocess.StartInfo.CreateNoWindow = true;
- pdf2swfprocess.EnableRaisingEvents = false;
- pdf2swfprocess.StartInfo.WorkingDirectory = @"C:\Documents and Settings\tirumalab\Desktop\PDF2SWF";
- pdf2swfprocess.StartInfo.RedirectStandardError = true;
- pdf2swfprocess.StartInfo.FileName = @"C:\Documents and Settings\tirumalab\Desktop\PDF2SWF\pdf2swf.exe";
- pdf2swfprocess.StartInfo.Arguments = inputfile + "-o" + outputfile;
- try
- {
- if (File.Exists(pdf2swfprocess.StartInfo.FileName))
- {
- pdf2swfprocess.Start();
- }
- else
- {
- Response.Write("The file is not found at tht location ");
- }
- pdf2swfprocess.WaitForExit();
- pdf2swfprocess.Close();
- }
But the same thing is working in command line folderpath>pdf2swf pdfdoc.pdf -o pdfswfdoc.swf.
Plz..help me.