Error executing * .msi file created using Visual Studio

I created a window service using C # in visual studio 2013. The windows service is working fine.

When I create an installation project and run the .msi file on another computer, it causes an error

Mistake

The steps I took:

1.Click on the solution → Other project types → Visual Studio Installer - Installation project

2.After adding the name, the File System Editor → Select the application folder → Right-click → Add → Project exit → Add project output group Project: my project with primary output is selected

File system editor

  1. Choose Custom Action Editor → Install → Right CLick → Add Custom Action → Select the application folder and exit Project.

Repeats the same for Uninstall

Custom action editor

  1. Create an installer.

.msi and the setup.exe file are created in the folder.

https://www.youtube.com/watch?v=cp2aFNtcZfk .

- , .


: projectInstaller

namespace certify4byd_ver2._0
{
partial class ProjectInstaller
{

    private System.ComponentModel.IContainer components = null;

    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }


    private void InitializeComponent()
    {
        this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller();
        this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
        // 
        // serviceProcessInstaller1
        // 
        this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalService;
        this.serviceProcessInstaller1.Password = null;
        this.serviceProcessInstaller1.Username = null;

        // 
        // serviceInstaller1
        // 
        this.serviceInstaller1.Description = "Quick Source specific development to allow ftp files to be send to ByDesign envir" +
"onment";
        this.serviceInstaller1.DisplayName = "Quick Source Certify4ByDesign";
        this.serviceInstaller1.ServiceName = "qs_certify4byd_v2.0";
        this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
        this.serviceInstaller1.AfterInstall += new System.Configuration.Install.InstallEventHandler(this.serviceInstaller1_AfterInstall);
        // 
        // ProjectInstaller
        // 
        this.Installers.AddRange(new System.Configuration.Install.Installer[] {
        this.serviceProcessInstaller1,
        this.serviceInstaller1});

    }

    #endregion

    private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1;
    private System.ServiceProcess.ServiceInstaller serviceInstaller1;
    }
}
+4
1

, , . Windows, , MSI .

ServiceInstaller? , .NET , .

Visual Studio, , , , . Debuggable Installable Service, Visual Studio, Windows ( ), . , ServiceInstaller, .

, Debuggable Installable Service WiX Toolset. , ( , ), , .

Visual Studio.

0

Source: https://habr.com/ru/post/1624289/


All Articles