当前位置:编程学习 > asp >>

也许是好东西——Windows Script Host-5关机/For win9x

答案:'************************************************
' file:    RunExit.vbs (WSH sample in VBScript)
' Author:  (c) G. Born
'
' Using the Run method to call the Windows 95/98
' ExitWindows API function
'************************************************
Option Explicit

Dim WshShell

Set WshShell = WScript.CreateObject("WScript.Shell")

If (MsgBox("Shut down Windows 95/98", vbYesNo + vbQuestion, _
    "WSH sample - by G. Born") = vbYes) Then _
    WshShell.Run _
        "%WINDIR%\RunDll32.exe user,ExitWindows", 1, -1

'*** End

上一个:也许是好东西——Windows Script Host-4获取当前目录
下一个:也许是好东西——Windows Script Host-7Format

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,