Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1741

Have mongod/mongos --installService --reinstallService and --removeService invoke a windows UAC prompt

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.7.0
    • Fix Version/s: None
    • Component/s: Usability
    • Labels:
      None
    • Environment:
      Windows only
    • Sprint:
      Security 2019-07-15, Security 2019-07-29

      Description

      If you have UAC enabled, you need to be running from an already elevated command prompt for service installation and removal to succeed. Manipulating the Service Control Manager requires elevated privileges.

      It seems the preferred method for doing this is ShellExecute() with the runas verb, but that would involve a second process. There is a way to use COM objects to keep it in once process. I think tat is over complicating it. Perhaps a hidden option or an alternative entry function besides main() (and whatever win32 api trickery is needed to call that) combined with ShellExecute is the way to go.

      To clarify, UAC is not needed to run mongo as a service, just install or remove it.

        Attachments

          Activity

            People

            Assignee:
            mark.benvenuto Mark Benvenuto
            Reporter:
            zippy1981 Justin Dearing
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: