星期日, 11月 07, 2010

[C# WinForm]在程式中開啟 檔案總管

    EXPLORER.EXE [/n][/e][,/root,][[,/select],

    /n:會針對每一個選取的項目,以單窗格 (我的電腦) 檢視方式開啟一個新視窗,
    即使新視窗與已開啟的視窗重複
    也一樣。
    
    /e:會使用 Windows 檔案總管檢視。Windows 檔案總管檢視十分類似
    Windows 3.x 版中的檔案管理員。請注意,預設檢視為
    開啟檢視。
    
    /root,:會指定所指定之檢視的根層級。預設 是使用標準命名空間根目錄 ( 桌面)。所指定的就是顯示器的根目錄 。  /select,:會指定成為初始焦點的資料夾 。如果使用 "/select",則會開啟
    上層資料夾,並選取所指定的物件。
    • "My Computer" highlighted in left side with all drives visible but not expanded and C: highlighted in right side: %SystemRoot%explorer.exe /e,/select,c:
    • Desktop highlighted and nothing expanded: %SystemRoot%explorer.exe /e,/n,/select,/root,c:
    • All drives visible and the system drive highlighted and expanded in full screen: %SystemRoot%explorer.exe /e,/select
    • All drives visible and the system drive expanded in small screen: %SystemRoot%explorer.exe /e,/select,%systemroot%
    • Only Windows Directory visible highlighted and expanded: %SystemRoot%explorer.exe /e,/root,%systemroot%
    • All drives visible but only C: highlighted and expanded: %SystemRoot%explorer.exe /e,c:
    • Nothing expanded and My Computer highlighted in right side: %SystemRoot%explorer.exe /n,/e,/select,
    • Opens the Windows folder as a folder: %SystemRoot%explorer.exe %systemroot%
    • Opens as "My Computer": %SystemRoot%explorer.exe %systemroot%,
    • This opens the Desktop folder with "My Computer" highlighted: %SystemRoot%explorer.exe %systemroot%,/select,
    • "Desktop" highlighted in the left side and no drives visible:
      %systemroot%explorer.exe /e,/root,::{20D04FE0-3AEA-1069-A2D8-08002B30309D},/select
    • "My Computer" highlighted in left side and all drives visible but none expanded:
      %systemroot%explorer.exe /e,/root,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
    • "Desktop" in left side highlighted and "My Computer" highlighted in right side and no drives visible:
      %systemroot%explorer.exe /e,/select,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

    Reference:
    在程式中開啟 檔案總管 (Using C#)
    如何開啟檔案總管在想要的目錄.

    沒有留言:

    張貼留言

    留個話吧:)

    其他你感興趣的文章

    Related Posts with Thumbnails