0

This may be a newbie question so excuse me for that.

My installation works fine without any error, All the files get copied to the install folder BUT there is no service installed? Any help is appreciated.

I have a simple installation that copies few files into the install directory and then installs the service from one of the installed files. Here is the my program.cs relevant code

   WixSharp.File service;

    var project = new ManagedProject("DMACSServer",
           new Dir( @"%ProgramFiles%\DRR\DMACS SLM",
           new DirFiles(@"Z:\DEV\current\FrameworkDLLS\*.*")));
    new Dir(@"%ProgramFiles%\DRR\DMACS SLM",
service = new WixSharp.File(@"Z:\DEV\current\FrameworkDLLS\SLMService.exe"));

    service.ServiceInstaller = new ServiceInstaller
    {
        Name = "DMACS SLM Service",
        StartOn = SvcEvent.Install, //set it to null if you don't want service to start as during deployment
        StopOn = SvcEvent.InstallUninstall_Wait,
        RemoveOn = SvcEvent.Uninstall_Wait,
        //DelayedAutoStart = true,
    };



    project.GUID = new Guid("97b17bfe-6086-4072-8f23-6859a44c4fa4");


    project.MajorUpgradeStrategy = MajorUpgradeStrategy.Default;

    project.ManagedUI = ManagedUI.Empty;    //no standard UI dialogs
    project.ManagedUI = ManagedUI.Default;  //all standard UI dialogs

    //custom set of standard UI dialogs
    project.ManagedUI = new ManagedUI();

    project.ManagedUI.InstallDialogs.Add(Dialogs.Welcome)
                                    .Add<EnvironmentDialog>()
                                    .Add<RolesDialog>()
                                    .Add(Dialogs.InstallDir)
                                    .Add(Dialogs.Progress)
                                    .Add(Dialogs.Exit);

    project.ManagedUI.ModifyDialogs.Add(Dialogs.MaintenanceType)
                                   .Add(Dialogs.Features)
                                   .Add(Dialogs.Progress)
                                   .Add(Dialogs.Exit);

    project.Load += Msi_Load;
    project.BeforeInstall += Msi_BeforeInstall;
    project.AfterInstall += Msi_AfterInstall;
    project.PreserveTempFiles = true;
    //project.SourceBaseDir = "<input dir path>";
    //project.OutDir = "<output dir path>";

    project.BuildMsi(); 
Dean Kuga
  • 11,878
  • 8
  • 54
  • 108
  • Have you confirmed in your MSI file that the ServiceInstall (https://msdn.microsoft.com/en-us/library/windows/desktop/aa371637(v=vs.85).aspx) and ServiceControl table are populated with your service? If they are then I would look at the linkage to the proper Component. Then from there look at the install log, searching for the Component, to find out why the service did not install. Also in the log look for the InstallServices action. This is where your magic is supposed to take place. – Doc Feb 14 '18 at 13:13
  • Figured it out. the problem was in my project deceleration. – Anil Suri Feb 14 '18 at 19:59

0 Answers0