On Error GoTo 0 For Each Process in GetObject("winmgmts:"). _ ExecQuery ("select * from Win32_Process where name='explorer.exe'") Process.terminate(0) Next MsgBox "Finished.", 4096, "Done"