如何通过Microsoft Visual C ++创建explorer.exe的新实例?

时间:2009-09-12 01:46:27

标签: windows-explorer

当我使用CreateProcess API时,结果是成功的,但是没有新的explorer.exe实例,旧实例只是打开一个文件夹。

那么,我如何通过Microsoft Visual C ++创建一个新的explorer.exe实例?

2 个答案:

答案 0 :(得分:1)

检查Explorer.exe Command-Line Options for Windows XP

引用:

The options that you can use with Explorer.exe are /n, /e, /root (plus an object), and /select (plus an object). Option Function


/n Opens a new single-pane window for the default selection. This is usually the root of the drive that Windows is installed on. If the window is already open, a duplicate opens.

/e Opens Windows Explorer in its default view.

/root, Opens a window view of the specified object.

/select, Opens a window view with the specified folder, file, or program selected.

Examples


Example 1: Explorer /select,C:\TestDir\TestProg.exe Opens a window view with TestProg selected.

Example 2: Explorer /e,/root,C:\TestDir\TestProg.exe Opens Explorer with drive C expanded and TestProg selected.

Example 3: Explorer /root,\TestSvr\TestShare Opens a window view of the specified share.

Example 4: Explorer /root,\TestSvr\TestShare,select,TestProg.exe Opens a window view of the specified share with TestProg selected.

答案 1 :(得分:0)