Run exe as a Service

D

Dan Pavel

Hi, I have an exe application in C# an I want to make it run like a
Windows Service. When the machine reboots accidentaly (over night) and
there is nobody to enter a user and a password (logon), the exe to start
at startup, like a service. Ist that possible ?

Thank you
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

It's possible, you have two options

1- Modify the .EXE to actually be run as a service, this would be the best
approach.

2- If you cannot modify the EXE then create a new service that all it does
at OnStart is execute the EXE. this is not as clear solution as the first
one but it should work anyway


cheers,
 
D

Dan Pavel

My application is quite big, so it would be easy for me to create a
service that will start my application.exe file. It would be started
even if nobody loged in ?

Thank you for your quick response.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top