How can I open Windows Explorer to a certain directory from within a WPF app?

前端 未结 4 561
执笔经年
执笔经年 2020-12-02 08:11

In a WPF application, when a user clicks on a button I want to open the Windows explorer to a certain directory, how do I do that?

I would expect something like this

4条回答
  •  被撕碎了的回忆
    2020-12-02 08:40

    Process.Start("explorer.exe" , @"C:\Users");
    

    I had to use this, the other way of just specifying the tgt dir would shut the explorer window when my application terminated.

提交回复
热议问题