Process.Start打开链接而不是文件夹

时间:2015-01-28 11:31:33

标签: c# .net winforms process

我在父文件夹中有两个项目:

  1. example - 一个文件夹。
  2. example.lnk - 指向Word文档的链接。
  3. (即使我显示了扩展名,也会在Windows资源管理器中隐藏.lnk扩展名。)

    执行时:

    Process.Start(@"C:\users\user1\theFolder\example");
    

    文档已打开。

    如何让它打开文件夹?

2 个答案:

答案 0 :(得分:4)

改为使用

Process.Start("explorer.exe", @"C:\users\user1\theFolder\example");

答案 1 :(得分:0)

明确指出其目录:

Process.Start(@"C:\users\user1\theFolder\example\");
相关问题