Installing a windows service on another machine - c#

I have been building a windows application. this application contains a windows service which performs certain action when the service is started, for example some FileIO operation.
Now this application needs to be deployed on the server. The server, obviously won't have visual studio in it. So how can i install that windows service there along with the application.
NOTE :- application is installed, just need to know how can i install the windows service.
Thanks in advance.

Related

C# windows service install with desktop application

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.
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

Install a windows service from Windows Store application

I'm building a desktop application in WPF that installs a Windows Service (that I'm also building) on first start.
I'd like to be able to build and distribute a windows store application out of this.
Building the package seems to work, but when the application tries to install the service, it fails because such an operation needs elevated privileges.
I know that windows store applications run in isolated environment but I really hope that for desktop application (not UWP) there's a way to tweak the appxmanifest to grant such operation.
Any help/advice is welcome !

how to create silent installer exe for wpf c# application?

I developed C# wpf application using 3rd party SDK now i want to deploy application. i want to create exe which is download and install application directly from web with minimal user interaction.
i also want to install .net framework silently on client machine without user interaction. for example like zoom meeting windows application.
Thank You.
you say download and install but how?
if you want to install like msi setup i'm suggest you to try squirrel
which is like clickonce but it works.
But you can also check: Installshield or Advanced Installer which it can let you create an update windows service. With windows service privileges, you can do your job without user interaction.
Also the other way which i prefered 2 months ago is your own application. You can create an updater windows service application. I've developed an updater software which checks an url for the version, if the version higher then download and update the application. Also check if application is running if app is not running then run it. i'm starting processes with an 3rd party tool which you can find it here you will need it if you want to develop your own application which is windows service. Because of windows service isolated "session 0"
I think best way will be your own development.

Packaging a .NET web service

I have no prior experience working in the .NET stack. Not sure if this is a common requirement. I have developed a simple .NET web service which accesses the COM library provided by a label printer SDK to send print jobs to the printer connected to my machine.
I need to distribute the web service to clients so that it can be hosted on their machines locally. Set up should be minimum - something like an installer which will do the needful to deploy the web service locally.
I assume that any windows machine comes with .NET bundled.
I understand that IIS is the windows equivalent of apache-tomcat. Does is it come bundled with all windows machines? If it does, I figure I can write some scripts to deploy the web service to IIS using the ".deploy" file generated by Visual Studio.
Are there any betters way of doing this ?
So my question is :
How do I distribute a web service that should be be hosted and run locally on the client's machine without forcing the user to download and install a web server and deploy the package?
Edit:
So, I gather IIS is not supported by home editions.

How to call Windows application using Windows service in C#?

I have created a Windows service with using that service. How will I call a Windows application?
Windows services and Windows applications are completely different programs. Windows services are automatically started when the computer boots, have no user interface and have different security context than logged in user. You can't simply convert a Windows application to a Windows service (and expect it to run smoothly). If you want your program to always run (24/7) with no user interface then you can look into Windows services.
More on Windows services: "Windows Service vs Windows Application - Best Practice" and "Windows Service Applications".
You have to pick a Windows service from the project type in Visual Studio.
If you meant how can you host an application as a Windows service, the only way to do this is to create a new project of type Windows Service and use the Process class.
You can then create an install class and then use installutil or alternatively, use sc from the command line to install it.
Hey, you can easily run ANY application as Windows service with this utility - Application As Service by Eltima

Categories

Resources