0

I have a wpf desktop application (ERP) system

Application is using setup and deployment to create the .exe file

Now, i want to create a window service for my application to do some background check ups , synchronizations with my database etc.

I know how to create a service in.net and how manually to install it following the examples online.

My question is how i can install (or include let's say) this service within my .exe setup.

I don't want the user to be responsible to install the service.

Neither me to login every time someone pc to install the service

Not sure if i misunderstood the purpose of service but i found nothing online related to my question.

Stelios
  • 330
  • 5
  • 21
  • If you target the .NET Framework, you should be able to use the [ManagedInstallerClass](https://learn.microsoft.com/en-us/dotnet/api/system.configuration.install.managedinstallerclass?WT.mc_id=WD-MVP-5001077) to [programmatically install](https://stackoverflow.com/questions/2072288/installing-windows-service-programmatically) the service. – mm8 Sep 18 '20 at 20:20

1 Answers1

0

You can use Microsoft Visual Studio Installer Projects and include your service/main project at the same time

https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects