Process.Start() 间歇性地抛出“没有关联的应用程序..” 在 .DOC 文件上
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我怀疑您系统上的文件关联有些损坏。
打开 Windows 资源管理器,检查“工具”->“文件夹选项”->“文件类型”->“DOC”->“高级”->“打开”->“编辑”下定义的内容。
您应该具有以下值:
可能是没有高级按钮当选择 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:
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.