Run an exe
I am new to Windows programming and am trying to get my head around C# (like it so far).
I would some advice on how to do the following :-
I have .exe delivered to me from a third party that creates software key. It takes on argument (a filename) and encrypts it
(eg filecrypt.exe key.dat, this is how I run it from the command line).
I want to make a more user friendly form to create the file that is to be encrypted (I can do this), what I can't work out is how to run this exe from within my application.
I think I am part of the way there by using this code
using System.Diagnostics
Process p = new Process();
p.StartInfo = new ProcessStartInfo("notepad.exe");
p.StartInfo.UseShellExecute = true;
p.Start();
I can't though work out how to start the process with a file as an argument.
Any ideas ? Anyone done this before ?
|