Hi all,
How do I call my windows application from a windows service project ?
My solution consists of a windows project, a service project, a setup
project and 2 class projects. After installation, my output produces all the
relevant files in a folder "Install" on my c: drive.
I got the code which doesn't produce any output...
public partial class Service1 : ServiceBase
{
protected override void OnStart(string[] args)
{
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = @"C:\Install\Test1.exe";
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WorkingDirectory = @"C:\Install\";
proc.EnableRaisingEvents = true;
proc.Start();
eventLog1.WriteEntry(proc.StartInfo.FileName);
}
}
I want the Service1 to call my Test1.exe file (which will be installed into
the same folder), and run it. Is it possible to do that ? If not then how
should I approach the issue ?
Thanks for replying.
regards,
Andrew