在我的 WPF 應用程式中,我可以使用以下命令:
Process.Start(@"C:\Windows\System32\appwiz.cpl");
但這不起作用:
Process.Start(@"C:\Windows\System32\firewall.cpl");
我得到(德語):System.ComponentModel.Win32Exception:“Das System kann die angegebene Datei nicht finden”。檔案未找到。但是當我將C:\Windows\System32\firewall.cpl檔案放入資源管理器時,Firewall.cpl 正在打開。我嘗試了其他一些:
好的:
- 辦公桌.cpl
- hdwwiz.cpl
- inetcpl.cpl
- 國際化cpl
- 歡樂.cpl
- 主檔案
- mmsys.cpl
挪威克朗:
- 防火墻.cpl
- igfxCPL.cpl
- compmgmtlauncher.exe
問題是什么?
uj5u.com熱心網友回復:
根據評論,解決方案是c:\windows\sysnative\firewall.cpl或Project > Properties > Build tab,"Prefer 32-bit"未勾選。
https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
您也可以參考此鏈接下的兩個答案。
我如何將我的 Windows 表單與 .NET 框架鏈接到 Steam 而不會出現構建錯誤
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/494728.html
