Export (0) Print
Expand All
3 out of 6 rated this helpful - Rate this topic

Sc lock

Published: April 17, 2012

Updated: April 17, 2012

Applies To: Windows 7, Windows 8, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Vista

Locks the Service Control Manager database.

For examples of how to use this command, see Examples.

sc [<ServerName>] lock

 

Parameter Description

<ServerName>

Specifies the name of the remote server on which the service is located. The name must use the Universal Naming Convention (UNC) format (for example, \\myserver). To run SC.exe locally, omit this parameter.

/?

Displays help at the command prompt.

  • Locking the Service Control Manager's database prevents any services from starting. Use this command if you want to make sure that a service will not be started after it has been stopped. This will enable you to perform an action (for example, deleting the service) without interference.

  • Using the lock operation locks the Service Control Manager database and then enables you to unlock the database by typing u. You can also stop the process from which you locked the database.

To lock the Server Control Manager database on the local computer, type:

sc lock

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.