Install several services using MSI (setup project)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?=

    Install several services using MSI (setup project)



    Hi all,



    I continue with installation.



    I create three windows services. Each service has a Installer class.

    I create a Setup Project (MSI) for install all services.



    I want one MSI, not three MSI for each service.



    Is it possible install all services using one MSI ? any help, please



    Thanks in advance

    --





  • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

    #2
    RE: Install several services using MSI (setup project)

    I believe you just include them all in the install and put them all in the
    custom actions for it.


    --
    Ciaran O''Donnell
    try{ Life(); } catch (TooDifficultException) { throw Toys(); }



    "Alhambra Eidos Desarrollo" wrote:
    >
    >
    Hi all,
    >
    >
    >
    I continue with installation.
    >
    >
    >
    I create three windows services. Each service has a Installer class.
    >
    I create a Setup Project (MSI) for install all services.
    >
    >
    >
    I want one MSI, not three MSI for each service.
    >
    >
    >
    Is it possible install all services using one MSI ? any help, please
    >
    >
    >
    Thanks in advance
    >
    --




    >

    Comment

    • =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?=

      #3
      RE: Install several services using MSI (setup project)

      I believe you just include them all in the install and put them all in the
      custom actions for it.
      Thanks, all is right. It's works fine !!

      I guess now, the services can be installed by MSI, and too using installutil
      command. If the service has Installer class, all is right.

      My question now, how can I know, in my code in Installer class, if the
      caller is MSI or installutil ??

      Thanks again.

      Comment

      • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

        #4
        RE: Install several services using MSI (setup project)

        OK, there seems to be some confusion here, let me give you a run down of how
        I do it.

        I include the project outputs of my service projects in an installer.
        This then copies the binaries onto the machine during the install.
        Then I add the project outputs to the AfterInstall custom actions section of
        the installer.
        This causes the MSI to install the services on the machine services list so
        they run.

        These steps get the services onto the machine, and setup as a service in
        windows.

        InstallUtil is used at the command prompt to install/uninstall a service by
        passing it the path to the exe file for the service. This is normally done
        when a system admin just wants to copy the service exe to a machine and
        install it manually rather than by using and MSI installer.
        If there is just a minor change to the service,this is not required, you
        should be able to stop the service, copy the new version over the old and
        start the service.

        If you really want to know what has caused your code to run, I dont know of
        a built in way of doing it with information accessible in the installer class
        apart from using the Process class to get the current process. Then looking
        at the exe name to see if is MSIExec or installutil.

        Does this clear up everything for you.
        --
        Ciaran O''Donnell
        try{ Life(); } catch (TooDifficultException) { throw Toys(); }



        "Alhambra Eidos Desarrollo" wrote:
        >
        I believe you just include them all in the install and put them all in the
        custom actions for it.
        >
        Thanks, all is right. It's works fine !!
        >
        I guess now, the services can be installed by MSI, and too using installutil
        command. If the service has Installer class, all is right.
        >
        My question now, how can I know, in my code in Installer class, if the
        caller is MSI or installutil ??
        >
        Thanks again.

        Comment

        • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

          #5
          RE: Install several services using MSI (setup project)

          You have multiple threads covering the same topic now. You seem to think MSI
          and InstallUtil are interchangeable , but you need to use both. MSI to get
          the stuff in the right place, and InstallUtil to setup the service.

          "Alhambra Eidos Desarrollo" wrote:
          >
          I believe you just include them all in the install and put them all in the
          custom actions for it.
          >
          Thanks, all is right. It's works fine !!
          >
          I guess now, the services can be installed by MSI, and too using installutil
          command. If the service has Installer class, all is right.
          >
          My question now, how can I know, in my code in Installer class, if the
          caller is MSI or installutil ??
          >
          Thanks again.

          Comment

          Working...