Process.Start() 间歇性地抛出“没有关联的应用程序..” 在 .DOC 文件上

发布于 2024-07-09 08:09:15 字数 173 浏览 11 评论 0原文

System.Diagnostics.Process.Start() 抛出间歇性 System.ComponentModel.Win32Exception:没有应用程序与此操作的指定文件关联。

该文件是 .doc 文件。 他们始终可以手动打开它(双击)。

可能是什么问题呢? 谢谢

System.Diagnostics.Process.Start() is throwing intermittent System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation.

The file is a .doc file.
They are always able to open it manually (double-click).

What could be the problem?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不必你懂 2024-07-16 08:09:15

我怀疑您系统上的文件关联有些损坏。

打开 Windows 资源管理器,检查“工具”->“文件夹选项”->“文件类型”->“DOC”->“高级”->“打开”->“编辑”下定义的内容。

您应该具有以下值:

  • 操作:&打开
  • 应用程序(相应地调整路径):“C:\Program Files\Microsoft Office\Office12\WINWORD.EXE” /n /dde
  • 必须选中“使用 DDE”
    • DDE 消息:[REM _DDE_Direct][FileOpen("%1")]
    • 应用程序:WinWord
    • DDE 应用程序(无值):
    • 主题:系统

可能是没有高级按钮当选择 DOC 时,会出现“文件类型”对话框,并且出现“恢复”按钮。 如果用户使用 .doc 文件上下文菜单中的“打开方式...”选项手动更改文件关联,就会出现这种情况。 尝试单击“恢复”是否可以解决您的问题。

I would suspect that the file association on your system is somewhat broken.

Open Windows Explorer, and check what is defined under Tools->Folder Options->File Types->DOC->Advanced->Open->Edit.

You should have the following values:

  • Action: &Open
  • Application (adjust the path accordingly): "C:\Program Files\Microsoft Office\Office12\WINWORD.EXE" /n /dde
  • Use DDE must be checked
    • DDE Message: [REM _DDE_Direct][FileOpen("%1")]
    • Application: WinWord
    • DDE Application (no value):
    • Topic: System

It might be that there is no Advanced button on the File Types dialog when DOC is selected, and that instead a Restore button is present. This is the case if a user has manually changed the file association using the Open With... option from the context menu of .doc files. Try if clicking on restore solves your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文