Microsoft Operations Manager

LockWorkstation Method

The LockWorkstationmethod locks the workstation so that it is protected from unauthorized use.

[VBScript]
SystemManager.LockWorkstation()

Return Value

Boolean

Examples

The following example shows how to lock the workstation.

[VBScript] 
Function Lock()
	Dim objSystemManager
	Dim strErrorMsg

	strErrorMsg = ""

	Set objSystemManager = CreateObject("OpScrUtil.SystemManager")

	If Not(objSystemManager.LockWorkstation()) Then
		strErrorMsg = "Workstation was not locked. The error is "
& objSystemManager.GetError()
	End If

	Set objSystemManager = Nothing

	Lock = strErrorMsg
End Function

Requirements

Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

SystemManager Object


Did you find this information useful? Please send your suggestions and comments about the documentation to momsdk@microsoft.com.