Start application through windows service

Asked

Viewed 421 times

0

It is possible to start an . exe application on Windows Service c#?

Something like:

    protected override void OnStart(string[] args)
    {

        Process.Start(@"C:\service.exe");
    }

    protected override void OnStop()
    {
    }

Thank you!

  • 3

    be clearer

1 answer

4


You cannot launch an interactive desktop application from a Windows service. This has changed from Windows Vista.

You can even run Process.Start(@"C:\service.exe");, but the application will run in process form (background), and not as desktop application. This is due to the new user account control (UAC).

  • Good. I had no idea.

  • Perfect! Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.