Process myProcess = new Process();
string path = @'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727';
myProcess.StartInfo.FileName = path + '\\InstallUtil.exe';
myProcess.StartInfo.Arguments = @'/u C:\Service1\Service1.exe';
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
myProcess.WaitForExit(60000);
if (!myProcess.HasExited)
myProcess.Kill();
myProcess.Close();
Tuesday, April 21, 2009
C# - Run a Process (Run an EXE)
CodeProject: Windows Services Can Install Themselves. :
Labels:
C#,
windows process
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment