ShutDown - method of object Pm

Shutdown of the OS Windows.
ShutDown(nAction As Integer, bForce As Boolean)
Pm.ShutDown nAction, bForce
nAction(Integer) the way how the OS Windows has to be shut down
0 - logging off the user logged into the OS Windows is performed
1 - restart of the computer is performed
2 - switching off the computer is performed
bForce(Boolean) value of the parameter:
true - all tasks are forced to terminate (it can occur to the data loss)
false - the application are asked if there is possible to terminated their function
For this method the AppStop permission does not have to be fulfilled, in order to launch computer shut down (or restart) by external event without the user intervention (UPS signal, watchdog, etc.). If the method launch is to be enabled only for authorized user, then it is necessary to test the user permission by the Pm.TestUserInGroup method, see example no. 2.
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
See also:
VBScriptSelect and copy to clipboard

Pm.ShutDown 1, true
Launching the computer restart while testing whether the local user is a member of the $OPER user group.
VBScriptSelect and copy to clipboard

If Pm.TestUserInGroup(0, "$OPER") Then
  Pm.ShutDown 1, true
End If
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- ShutDown
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice