我想关闭Internet Explorer干净/优雅。任务杀手会关闭它,但当重新打开它时,它会问你是否想重新打开上一次会话。PowerShell中关闭Internet Explorer摆好/清洁
5
A
回答
7
尝试CloseMainWindow方法:关闭具有通过发送关闭消息到它的主窗口的用户界面的方法。
Get-Process iexplore | Foreach-Object { $_.CloseMainWindow() }
3
试试这个:get-process iexplore | stop-process
。
0
这样就可以循环并调用CloseMainWindow上所有窗口,这是正常关机API调用 - 它睡觉半秒给它的时候才去各地关闭每个:
powershell -Command "while ($true){Try{$process=Get-Process iexplore -ErrorAction Stop}Catch [Microsoft.PowerShell.Commands.ProcessCommandException]{break;}if ($process) {$whateva=$process.CloseMainWindow()}else {break;}Start-Sleep -m 500}"
相关问题
- 1. 的Visual Studio - 禁止关闭Internet Explorer中
- 2. Internet Explorer CSS旋转摆动
- 3. 关闭Internet Explorer的所有实例
- 4. Internet Explorer条件注释未关闭
- 5. 编写清洁无极完成关闭
- 6. 良好'ole Internet Explorer问题
- 7. 清洁替代方法在PowerShell中
- 8. 清除问题:正确;在Internet Explorer中
- 9. 良好的Javascript清洁
- 10. 弹出式关闭按钮在Internet Explorer中不起作用?
- 11. 关闭在Windows CE 5.0中的Internet Explorer的预防
- 12. 如何关闭Azure中的Internet Explorer增强安全设置
- 13. powershell 2.0无法获取Internet Explorer日志
- 14. Powershell预定作业; Internet Explorer不可见
- 15. 使用PowerShell和Internet Explorer下载文件
- 16. Internet Explorer清除保存用户名
- 17. 调用命令清除Internet Explorer缓存
- 18. WebSocket在Internet Explorer下关闭 - 错误代码1006
- 19. 如何在使用Process.Start运行时关闭Internet Explorer?
- 20. Internet Explorer 8导致Windows窗体意外关闭?
- 21. Internet Explorer弹出窗口和关闭窗口的问题
- 22. 如何使用mshtml关闭新打开的Internet Explorer
- 23. 如何提供关闭Internet Explorer窗口的确认?
- 24. SeleniumUI和Windows计划任务 - 关闭Internet Explorer
- 25. 如何使用mshtml(c#代码)关闭新打开的Internet Explorer
- 26. 停止EIdWinsockStubError,关闭Internet Explorer时出现WSACancelBlockingCall错误
- 27. Internet Explorer不通过硒脚本关闭每个解决方案
- 28. Internet Explorer 9渐变过滤器关闭子菜单
- 29. 如何使用PostThreadMessage从C++关闭Internet Explorer
- 30. Silverlight应用程序导致Internet Explorer关闭
这是否还关闭任何隐藏的IExplore隐藏进程? – 2017-06-21 01:28:04