locked
Creating an installer in Visual Studio 2013 RRS feed

  • Question

  • I've created a simple project in Visual Studio, using the following tutorial as a guide:

    Walkthrough: Creating a Windows Service Application in the Component Designer
    (It won't let me create a link to it yet, will verify account and try later)

    My project is simple:  It creates a Windows service that calls a batch file when starting, and a different batch file when stopping.. it's literally just a few lines of code.

    I created an installer, following the tutorial, which installs the service by Right-clicking the service within Visual Studio, and clicking Install.

    Instead, I need to be able to create an installer that works on other Windows machines, without installing Visual Studio and installing within the project itself.

    Is there a way to create an installer (exe, msi?) that can then be used on other computers?  When I try and create an InstallShield project, it redirects to a blank site.

    Thanks.
    Monday, September 22, 2014 2:18 PM

Answers

  • To install a service, just copy your executable where you want it, then use the SC CREATE command. No MSI, no installers, sorry :-(

    -- pa

    • Proposed as answer by cnk_gr Monday, September 22, 2014 8:51 PM
    • Marked as answer by Marvin_Guo Wednesday, October 1, 2014 8:27 AM
    Monday, September 22, 2014 8:44 PM
  • You can add an installer to your project by right click "Add installer".

    Then command line to install your service is:

    (Path to .NET Libraries .. e.g. C:\Windows\Microsoft.NET\Framework\v2.0.50727)

    INSTALLUTIL myservice.exe and then it'll ask for credentials

    SC is a more generic solution for installing any kind of executable as a service
    • Edited by cnk_gr Monday, September 22, 2014 8:51 PM
    • Marked as answer by Marvin_Guo Wednesday, October 1, 2014 8:27 AM
    Monday, September 22, 2014 8:48 PM

All replies

  • You can add an installer to your project by right click "Add installer".

    Then command line to install your service is:

    (Path to .NET Libraries .. e.g. C:\Windows\Microsoft.NET\Framework\v2.0.50727)

    INSTALLUTIL myservice.exe and then it'll ask for credentials

    SC is a more generic solution for installing any kind of executable as a service
    • Edited by cnk_gr Monday, September 22, 2014 8:51 PM
    • Marked as answer by Marvin_Guo Wednesday, October 1, 2014 8:27 AM
    Monday, September 22, 2014 8:48 PM