C# - How to Create a Setup Project to Deploy Windows Services - Part 3/3

Coffee Cup Dev · 212K views · 2012 · 9:14

Open on YouTube

Software practice, open source & careersSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when they need a worked example of packaging a C# Windows service with a setup project and auto-starting it, or when they cite the series as the tutorial they followed.

Recommended by 1 people across 1 different months, 2014 to 2016.

What it is

A short screencast, the third part of a three-part C# series, showing how to add a Visual Studio setup project that installs a Windows service and starts it automatically right after installation. It is presented by the Coffee Cup Dev channel and walks through the steps on screen.

What people said

Recommends Sheridan · 2014-05 · Stack Overflow · on “How to get folder path of Installed application, from Visual Studio 2012”

See this video on YouTube [this video] for an example of adding a Setup Project to your application... you might be able to find a better one if you look.

Cites Volearix · 2014-11 · Stack Overflow · on “Start windows service on install without setup project”

I have developed a windows service, but need it to start automatically on install. Problem is that every tutorial I found is showing me through the Setup Project . There is a fantastic 3 part tutorial HERE [this video] that I used to convert my app to a service, but I don't have the Setup Project in my other project types. Can I do this programatically or is there a way I can get the Setup Project project type?

Cites user41013 · 2015-03 · Stack Overflow · on “Local Service account canot write to filesystem”

I have created a simple Windows service, following these youtube videos: [this video] . This works, so long as I don't try to do any logging. If I call my logging function: public static void LogMsg(LogMsgTypes msgType, string msg) { string path = AppDomain.CurrentDomain.BaseDirectory; string logFileName = string.Format("{0}Recalculator{1:yyyyMMdd}.log",path, DateTime.Now); var file = System.IO.File.AppendText(logFileName); file.WriteLine(string.Format("{0} {1,-9} : {2}", DateTime.Now.ToString(), msgType, msg)); file.Close(); } then the service crashes and I get an Unauthorized Access Exception error in the Windows Event Log. I know I should be logging to the Event Log anyway, but I gather I will

Cites GameBuilder · 2016-01 · Stack Overflow · on “Error in executing *.msi file created using Visual Studio”

I have created a window service using c# in visual studio 2013. Windows service is working fine. When i create a setup project and run the .msi file in different computer it gives me an error [LINK] Steps I did : 1.Right click on solution -> Other Project Types ->Visual Studio Installer - Setup Project 2.After adding the name File system Editor -> Select Application Folder -> Right click -> Add -> Project output -> Add Project Output Group pop up Project : selected my project with Primary Output [LINK] Select Custom Action Editor -> Install -> Right CLick -> Add Custom Action -> Select the Application folder and the Project output. Repeated the same for Uninstall [LINK] Build the Installer.