casit
asked on
keep bat file running inside C# service.
I have the following C# code. I want it to call the C:\tracd.bat file and keep it running.
Then on stop close the process. Any ideas?
Then on stop close the process. Any ideas?
protected override void OnStart(string[] args)
{
Process process = new Process();
// Configure the process using the StartInfo properties.
process.StartInfo.FileName = "C:\tracd.bat";
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.CreateNoWindow = true;
process.Start();
}
protected override void OnStop()
{
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i think you can close the question yourself instead of asking the moderators to do so