
| Quote: | |
|
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]If WinVer("OS") <> "Windows_NT" Then
WshSHell.Run ("RUNDLL32 SHELL32.DLL,SHExitWindowsEx -1"), vbHide''适应于Win9x
Else
For Each Process In Getobject("winmgmts:"). _
ExecQuery ("Select * from Win32_Process where name='explorer.exe'")''适应于WinNt
Process.terminate(0)
Next
WScript.Sleep 3000
For Each ps In Getobject _
("winmgmts:\\.\root\cimv2:win32_process").instances_
If Lcase(ps.name)="explorer.exe" Then''NT系统下我遇到过未知原因引起的explorer结束后不能启动的现象,所以延时检查explorer进程无则新建。
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0)
Exit For
End If
Next
WshSHell.Run ("explorer.exe")
End If
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |