簡體   English   中英

如何阻止Windows資源管理器和Internet Explorer自動重新啟動?

[英]How to stop Windows Explorer and Internet Explorer from auto-restarting?

我有一個程序,該程序需要訪問Windows資源管理器和Internet Explorer使用的某些文件。 我發現的唯一方法是關閉Explorer和IE進程-但是Proc.Kill()和RestartManager-RmShutdown()只是暫時關閉它們-然后重新啟動。 我找到了一種解決方法:我正在使用cmd-taskkill / im-但這確實很丑。 還有什么更好的方法來關閉它們?

BOOL ExitExplorer()
{
    HWND hWndTray = FindWindow(_T("Shell_TrayWnd"), NULL);
    return PostMessage(hWndTray, 0x5B4, 0, 0);
}

這是正常退出資源管理器的代碼:)在StackOveflow上的此處找到它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM