Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Displays the Shut Down Windows dialog box. This is the same as clicking the Start menu and selecting Shut Down.
Syntax
iRetVal = Shell.ShutdownWindows()
Shell.ShutdownWindows() As Integer
Parameters
This method has no parameters.
Examples
The following example shows ShutdownWindows in use. Proper usage is shown for JScript, VBScript, and Visual Basic.
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
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client |
Windows 2000 Professional, Windows XP [desktop apps only] |
| Minimum supported server |
Windows 2000 Server [desktop apps only] |
| Header |
|
| IDL |
|
| DLL |
|