[英]Intermittent System.ComponentModel.Win32Exception: The network path was not found
[英]System.ComponentModel.Win32Exception: Path not found
在我的 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 正在打開。 我嘗試了其他一些:
好的:
挪威克朗:
問題是什么?
根據評論,解決方案是c:\windows\sysnative\firewall.cpl
或Project > Properties > Build tab
, "Prefer 32-bit"
未勾選。
https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector
您也可以參考此鏈接下的兩個答案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.