-3

I am new to C# code, I need to run the below commands by using C# code, Could any one give me the full code for this one?

Command :

C:\\Srinivasa\\VisualStudioProject\\CutyCapt_Pdf_Code\\release\\CutyCapt.exe 

Arguments :

--url=file:///C:/Users/UPPALASX/Desktop/New%20folder/ResearchMap.html 
--out=Out_Embeded_RM.png 
--min-width=800 
--min-height=10000

2 Answers2

3

Try This:

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "C:\\Srinivasa\\VisualStudioProject\\CutyCapt_Pdf_Code\\
              release\\CutyCapt.exe";
startInfo.Arguments = "--url=\'C:/Users/UPPALASX/Desktop/New 
             folder/ResearchMap.html\' --out=Out_Embeded_RM.png --min-width=800
             --min-height=10000";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
Sudhakar Tillapudi
  • 25,935
  • 5
  • 37
  • 67
  • 3
    You chose to answer a poorly-researched question. That's your prerogative. However, copy-pasting a block of code from an answer in the duplicate then modifying some property values to suit the questioner's specific problem does not strike me as the right thing to do. Maybe you could provide attribution to the [source answer](http://stackoverflow.com/a/1469790/464709). – Frédéric Hamidi Mar 18 '14 at 10:59
  • @FrédéricHamidi: sorry dear, i never copy paste any answer from anywhere it was just tried in my VS and posted here. – Sudhakar Tillapudi Mar 18 '14 at 11:01
2

Look at Process.Start and Process.StartInfo

SuicideSheep
  • 5,260
  • 19
  • 64
  • 117