【发布时间】:2013-06-18 20:12:45
【问题描述】:
我正在尝试使用以下代码在 2 个文件中打开一个文档;
try
{
startInfo.FileName = "WINWORD.EXE";
}
catch(Win32Exception)
{
startInfo.FileName = "TMViewer.exe";
}
我的笔记本电脑上没有消息,所以希望 catch 会触发它在文字查看器程序中打开,但我收到了这条消息;
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
我已更新注册表以获取运行 TMViewer.exe 的快捷方式,它实际上可以在我的另一台 PC 上运行,但如果我尝试在没有单词的笔记本电脑上运行它,我会不断收到此错误。
【问题讨论】: