Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I disable a service in Windows XP for a specific user account?

I have Tomcat and DB2 which I'm using as an administrator, but I don't need them as a plain user.

Furthermore, since that account does not have privileges on some files, services are failing to start and showing annoying errors repeatedly.

I tried using services.msc, but those settings seem to be global, and I can't change them from non-admin account.

share|improve this question
In short, the service settings seem to be global because services are global. – grawity May 9 '12 at 13:19
up vote 2 down vote accepted

You cannot disable services on a per-user basis since services run independent of the logged in user. The best you can do is to stop the service automatically when the normal user logs in. You can do this with a batch script:

net stop <servicename>

Since the user probably doesn't have permission to stop services, you'll want to add a scheduled task, configure it to run at the specified user's logon, and to run as an administrator (or other user with sufficient privileges).

If there are multiple normal users, you'll need to add this scheduled task for all of them, and then probably one that starts the services for the administrator.

For more information on net stop and net start:

share|improve this answer

You could take one of the above solutions a step farther. I like the scheduled task idea. If you're comfortable with VbScript (or any programming language really) you could write a script to identify who is logged in and then shell the "net stop " depending on whether they were in the administrator group (or as a quick but less flexible way you could say if they're not your user account).

Here's a rough draft of a script that I just copied and pasted together that would probably work:

Dim objNetwork
Set objNetwork = CreateObject("WScript.Network")

If objNetwork.UserName <> "YourAccountUsername" Then
    ' If they're not you, send the shell command to stop the service.
    Dim objShell
    Set objShell = WScript.CreateObject("WScript.Shell")     
    objResult = objShell.Run("net stop <service name>", 1, True) 
End If
share|improve this answer

Services are machine-wide. There is no concept of which user is currently logged into the workstation with regards to services. I believe Tomcat can be started under a user's profile (as in... a shortcut can possibly be used to start the process running) ... but I doubt DB2 will work in user-space.

share|improve this answer

It is not possible to stop the services according to user base. The services are the part of the running OS which it required the most and the programs also use the services at the time of launch which they need. You can only stop the services which are running by you manually not from the system but if you try to stop the service that required by the system it will not let you do and by the way its happen in any case OS will crash.

Services are like the limbs of the body which can stop for the certain time but when you will need it you have to active that part of the body and since there are many things you can't control like heart beat. Its depend on the system that how many and which services it needs to run.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .