I use ShellExecute to open files. On a single machine among 2000+ users, I cannot open doc files. docx open using wordpad.
Word 2010 is installed correctly, and double-clicking in the text file from the explorer opens the word correctly, moreover, the document is displayed with the correct icon in the explorer. Please note that all other files work fine (e.g. xls, xlsx, pdf, ...)
Does anyone know why? I checekd and โuse this application to open filesโ, it is checked.
In the code I check for an error and I know that the error message
SE_ERR_ASSOCINCOMPLETE or SE_ERR_NOASSOC
(because in both cases I show the error "no application is associated with the file type", so I donโt know which of the errors is, I shuold debug the client part to see it, but I donโt think it is so important in this case )
Does anyone have an idea? This is what I use to open the file:
ShellExecute(0, 'open', PWideChar(MyFilePath), '', '', SW_SHOWNORMAL);
Note: it seems to me that there is a problem in the Windows registry for this machine, it is almost a new Windows 7 machine.
NOTE for those who vote to close this question as Off Topic: this is actually a question in WinAPI: why does this api not work as expected when it does from explorer? So this is not off topic, especially winapi is in the tags.