System.Diagnostics.Process.Start() is throwing intermittent System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation.
System.Diagnostics.Process.Start()抛出间歇性System.ComponentModel.Win32Exception:没有应用程序与此操作的指定文件关联。
The file is a .doc file. They are always able to open it manually (double-click).
该文件是.doc文件。他们总是能够手动打开它(双击)。
What could be the problem? Thanks
可能是什么问题呢?谢谢
1 个解决方案
#1
2
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.
打开Windows资源管理器,检查工具 - >文件夹选项 - >文件类型 - > DOC->高级 - >打开 - >编辑下定义的内容。
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
DDE消息:[REM _DDE_Direct] [FileOpen(“%1”)]
DDE申请(无价值):
应用程序(相应地调整路径):“C:\ Program Files \ Microsoft Office \ Office12 \ WINWORD.EXE”/ n / dde
必须检查使用DDE DDE消息:[REM _DDE_Direct] [FileOpen(“%1”)]应用程序:WinWord DDE应用程序(无值):主题:系统
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.
可能是在选择DOC时“文件类型”对话框中没有“高级”按钮,而是存在“还原”按钮。如果用户使用.doc文件的上下文菜单中的“打开方式...”选项手动更改了文件关联,则会出现这种情况。尝试点击还原可以解决您的问题。
#1
2
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.
打开Windows资源管理器,检查工具 - >文件夹选项 - >文件类型 - > DOC->高级 - >打开 - >编辑下定义的内容。
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
DDE消息:[REM _DDE_Direct] [FileOpen(“%1”)]
DDE申请(无价值):
应用程序(相应地调整路径):“C:\ Program Files \ Microsoft Office \ Office12 \ WINWORD.EXE”/ n / dde
必须检查使用DDE DDE消息:[REM _DDE_Direct] [FileOpen(“%1”)]应用程序:WinWord DDE应用程序(无值):主题:系统
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.
可能是在选择DOC时“文件类型”对话框中没有“高级”按钮,而是存在“还原”按钮。如果用户使用.doc文件的上下文菜单中的“打开方式...”选项手动更改了文件关联,则会出现这种情况。尝试点击还原可以解决您的问题。