Allow a Windows user to start/stop a service

Allow a Windows user to start/stop a service

Background

On newer Windows OS’s, the current user may not be allowed to install/start/stop services.  This may prevent the user from installing/starting/stopping TopView Engine Services.

The solution has been to run the Configurator “as Administrator” (right-click, “Run as Administrator”) and then perform the service install/start/stop.

Issue

User of the TopView Configurator cannot stop/start a TopView Engine Service and must close the Configurator and re-open “as Administrator” to get permission.

Example: error when trying to start a service (TopView configuration name is exampleconfig):

Desired solution: give the user permission to start/stop a TopView Engine Service

Solution

  • Install the TopView Engine Service by running the Configurator “as Administrator”
  • Close the Configurator
  • Download and install Microsoft tool SubInACL
  • Launch a command prompt “as Administrator”
  • Go to folder “C:\Program Files (x86)\Windows Resource Kits\Tools”:
    • cd \Program Files (x86)\Windows Resource Kits\Tools\
  • From the command prompt run: subinacl.exe /service servicename /grant=username=F
    where servicename is the name of the service and username is the name of the user (local user account)

    • Example: grant local user “abc” permission to start/stop TopView Engine Service for configuration named “exampleconfig”
      subinacl.exe /service topview_exampleconfig /grant=abc=F
  • If the command succeeds the user should now be able to start/stop service. If there are problems have the user log off/on and try again.

Permissions

“F” = Full control. If you want to set specific permissions you can add one or more of the following permissions:

  • F : Full Control
  • R : Generic Read
  • W : Generic Write
  • X : Generic eXecute
  • L : Read control
  • Q : Query Service Configuration
  • S : Query Service Status
  • E : Enumerate Dependent Services
  • C : Service Change Configuration
  • T : Start Service
  • O : Stop Service
  • P : Pause/Continue Service
  • I : Interrogate Service
  • U : Service User-Defined Control Commands