Windows Service Install

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RajkiranPro

    Windows Service Install

    i created a windows service and created a installer for it..

    i just want to add a feature to it.. please guide me in doin that..

    the serviceprocessi nstaller allows me to specify the account type as
    the Local System account..

    However i want enable the option Allow Service To Interact With The
    desktop while the installer installs insted of manually enabling the
    option...

    is that possible"

    Thanks in Advance

    Rajkiran

  • Family Tree Mike

    #2
    Re: Windows Service Install

    I would not recommend doing this as it is not supported in Vista, nor likely
    in any further operating systems.

    If you only support XP and below however, this artical seems to help.
    http://www.codeproject.com/KB/instal...cedesktop.aspx.


    "RajkiranPr o" <RajkiranPro@gm ail.comwrote in message
    news:34bd6322-4bc1-4e11-ae1e-1a44fac7ea0d@i7 6g2000hsf.googl egroups.com...
    >i created a windows service and created a installer for it..
    >
    i just want to add a feature to it.. please guide me in doin that..
    >
    the serviceprocessi nstaller allows me to specify the account type as
    the Local System account..
    >
    However i want enable the option Allow Service To Interact With The
    desktop while the installer installs insted of manually enabling the
    option...
    >
    is that possible"
    >
    Thanks in Advance
    >
    Rajkiran
    >

    Comment

    • Family Tree Mike

      #3
      Re: Windows Service Install

      This link will tell you how to do it if you must. You won't be able to do
      this under windows vista however, nor likely any subsequent windows
      operating systems.



      "RajkiranPr o" <RajkiranPro@gm ail.comwrote in message
      news:34bd6322-4bc1-4e11-ae1e-1a44fac7ea0d@i7 6g2000hsf.googl egroups.com...
      >i created a windows service and created a installer for it..
      >
      i just want to add a feature to it.. please guide me in doin that..
      >
      the serviceprocessi nstaller allows me to specify the account type as
      the Local System account..
      >
      However i want enable the option Allow Service To Interact With The
      desktop while the installer installs insted of manually enabling the
      option...
      >
      is that possible"
      >
      Thanks in Advance
      >
      Rajkiran
      >

      Comment

      • Jeff Winn

        #4
        Re: Windows Service Install

        The proper way of setting that value isn't from modifying the registry
        directly, it's using the Service Control Manager (SCM) to open the service
        and modify the configuration using the APIs Microsoft has created.
        Specifically the ChangeServiceCo nfig function. If you are doing this on
        Vista you will need to ensure you elevate the privileges of the user before
        you open the SCM otherwise you will not get a valid handle to use.



        The suggested way of doing this is within your Installer that you've placed
        within your application, override the OnCommit method (ensuring that you
        allow it to call base.OnCommit) and calling the function from within there.

        Here is a link to the ChangeServiceCo nfig function on pinvoke.net if you
        aren't sure how to handle the interop yourself.




        "RajkiranPr o" <RajkiranPro@gm ail.comwrote in message
        news:34bd6322-4bc1-4e11-ae1e-1a44fac7ea0d@i7 6g2000hsf.googl egroups.com...
        >i created a windows service and created a installer for it..
        >
        i just want to add a feature to it.. please guide me in doin that..
        >
        the serviceprocessi nstaller allows me to specify the account type as
        the Local System account..
        >
        However i want enable the option Allow Service To Interact With The
        desktop while the installer installs insted of manually enabling the
        option...
        >
        is that possible"
        >
        Thanks in Advance
        >
        Rajkiran
        >

        Comment

        • Jeff Winn

          #5
          Re: Windows Service Install

          >I would not recommend doing this as it is not supported in Vista, nor
          >likely in any further operating systems.
          Actually, this feature is still supported in Vista. Microsoft chose to not
          implement all the functionality of the ChangeServiceCo nfig and
          ChangeServiceCo nfig2 API functions in the .NET Framework. If you want more
          advanced functionality than what is provided out of the box with .NET you
          have to do the interop yourself.

          "Family Tree Mike" <FamilyTreeMike @ThisOldHouse.c omwrote in message
          news:B863B60A-6855-4F94-B74D-0A3C82509380@mi crosoft.com...
          >I would not recommend doing this as it is not supported in Vista, nor
          >likely in any further operating systems.
          >
          If you only support XP and below however, this artical seems to help.
          http://www.codeproject.com/KB/instal...cedesktop.aspx.
          >
          >
          "RajkiranPr o" <RajkiranPro@gm ail.comwrote in message
          news:34bd6322-4bc1-4e11-ae1e-1a44fac7ea0d@i7 6g2000hsf.googl egroups.com...
          >>i created a windows service and created a installer for it..
          >>
          >i just want to add a feature to it.. please guide me in doin that..
          >>
          >the serviceprocessi nstaller allows me to specify the account type as
          >the Local System account..
          >>
          >However i want enable the option Allow Service To Interact With The
          >desktop while the installer installs insted of manually enabling the
          >option...
          >>
          >is that possible"
          >>
          >Thanks in Advance
          >>
          >Rajkiran
          >>
          >

          Comment

          Working...