Monitor Surface Loader Process

Microsoft.Surface.1.0.MonitorSurfaceLoaderProcess (UnitMonitor)

Knowledge Base article:

Summary

The SurfaceLoader process is a key component of Microsoft Surface.

Causes

This process does not run when the unit is switched out of User Mode.

Resolutions

If the unit is not in User Mode, switch the unit to User Mode.

Additional

For additional information about modes, refer to the Microsoft Surface Administration Guide.

Element properties:

TargetMicrosoft.Surface.1.0.SurfaceUnit
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.TimedScript.TwoStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Monitor Surface Loader Process
Critical process is not running:
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Surface.1.0.MonitorSurfaceLoaderProcess" Accessibility="Public" Enabled="true" Target="Microsoft.Surface.1.0.SurfaceUnit" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.TimedScript.TwoStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Surface.1.0.MonitorSurfaceLoaderProcess_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='ProcessName']$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>300</IntervalSeconds>
<SyncTime>00:00</SyncTime>
<ScriptName>CheckProcess.vbs</ScriptName>
<Arguments>SurfaceLoader.exe</Arguments>
<ScriptBody><Script>
'''''''''''''''''''''''''''''''''''''''''''''''
' The following script detects the existance of a running process
'
'''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit

Dim args, strProcessName, objWmi, aProcesses, objProcess, objMomApi, objMomBag, strWmiQuery

' Look for the process in the list of running processes
Set args = WScript.Arguments
strProcessName = args(0)

Set objWmi = GetObject("winmgmts:\\.\root\cimv2")
strWmiQuery = "SELECT * FROM Win32_Process WHERE Name = '" &amp; strProcessName &amp; "'"
Set aProcesses = objWmi.ExecQuery(strWmiQuery)

' Connect to the MOM API and create a property bag
Set objMomApi = CreateObject("MOM.ScriptAPI")
Set objMomBag = objMomApi.CreatePropertyBag()

' Add properties to the property bag
Call objMomBag.AddValue("ProcessName", strProcessName)
Call objMomBag.AddValue("ProcessCount", aProcesses.Count)

' Return the property bag to MOM
Call objMomApi.Return(objMomBag)

</Script></ScriptBody>
<TimeoutSeconds>180</TimeoutSeconds>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ProcessCount']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">1</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ProcessCount']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">1</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>