Shell.ShutdownWindows-Methode

Zeigt das Dialogfeld Windows herunterfahren an. Dies entspricht dem Klicken auf das Startmenü und dem Auswählen von Herunterfahren.

Syntax

iRetVal = Shell.ShutdownWindows()

Shell.ShutdownWindows() As Integer

Parameter

Diese Methode hat keine Parameter.

Beispiele

Das folgende Beispiel zeigt ShutdownWindows in Verwendung. Die ordnungsgemäße Verwendung wird für JScript, VBScript und Visual Basic angezeigt.

Jscript:

<script language="JScript">
    function fnShellShutdownWindowsJ()
    {
        var objShell = new ActiveXObject("shell.application");
        
        objShell.ShutdownWindows();
    }
</script>

Vbscript:

<script language="VBScript">
    function fnShellShutdownWindowsVB()
        dim objShell
        
        set objShell = CreateObject("shell.application")
        objShell.ShutdownWindows

        set objShell = nothing
    end function

Visual Basic:

Private Sub fnShellShutdownWindowsVB()
    Dim objShell As Shell
    
    Set objShell = New Shell
    objShell.ShutdownWindows

    Set objShell = Nothing
End Sub

Anforderungen

Anforderung Wert
Unterstützte Mindestversion (Client)
Windows 2000 Professional, Windows XP [nur Desktop-Apps]
Unterstützte Mindestversion (Server)
Windows 2000 Server [nur Desktop-Apps]
Header
Shldisp.h
IDL
Shldisp.idl
DLL
Shell32.dll (Version 4.71 oder höher)