views:

659

answers:

2

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

+1  A: 

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.

Regards, divo

0xA3
A: 

Is it possible that the file in question is a shortcut?

Remou