Share via

Command-Line Options for Explorer.exe

Anonymous
2010-08-18T19:00:28+00:00

Original Title: What are the command line switches for explorer.exe, with examples to open with an initial view of the desktop, the mydocuments folder, and other folders which change from user to user?

What are the command line switches for explorer.exe, with examples to open with an initial view of the desktop, the mydocuments folder, and other folders which change from user to user?

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2011-01-30T08:39:50+00:00

    explorer.exe shell:desktop

    explorer.exe shell:personal

    explorer.exe shell:my pictures

    etc.

    see HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

    6 people found this answer helpful.
    0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-06-11T23:00:00+00:00

    Now that I have all this is there a switch that will enable a search for the specified location. Pass parameters to the new instance of explorer as search criteria. Open the new window and begin a search for *abc.txt, include subfolders etc. for typical search switches.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2011-01-30T08:09:38+00:00

    Henry Hawk, thanks.

    Your suggestion does not seem to work for Windows 7.

    I don't have a "Devry" folder, so I entered:

    %windir%\explorer.exe /e, "%USERPROFILE%\My Documents

    This gives the following error message:

    C:\Users\Bob\My Documents is not accessible.   ...   Access is denied.

    By trial and error, I found this string to access the My Documents folder in Windows 7:

    %windir%\explorer.exe /e, "My Documents"

    Notice that the path seems to be user-independent. Aha!

    However, substituting "My Pictures" or "Pictures" or "Desktop" doesn't work, also "Downloads" doesn't work.

    I was able to access the desktop with:

    %windir%\explorer.exe /e, "C:\Users\Bob\Desktop"

    The My Pictures folder:

    %windir%\explorer.exe /e, "C:\Users\Bob\Pictures"

    Notice that these will only work if the current user is Bob. It would still be nice to get user-independent strings for these various folders.

    Finally, I have been adding things to the Libraries and Favorites, which is probably just as good as having a custom icon anyway.

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-10-27T18:57:18+00:00

    Hello Syed N,

    I have been unable to get my Windows 7, Window Explorer.exe to open up to the folder that I want. You stated/inferred that the same command line arguments that are valid with Windows XP are valid with Windows 7 I believe but I have not been able to duplicate the same explorer.exe command line in Windows 7 that works fine in Windows XP:

    C:\Windows\Explorer.exe /e, /select, c:\betterdays\My Documents\Devry

    I have set the same path in both my Windows 7 and Windows XP systems; When the shortcut is clicked in XP I am left in the "Devry" directory which is what I want, but in Windows 7 I keep getting dumped in the "c:\betterdays" directory with the "My Documents" directory highlighted and nothing I have tried will get me to the "Devry" directory.

    Would you please give me a heads up?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2010-08-19T06:03:19+00:00

    Hi BobishKindaGuy,

    Refer the following Knowledge Base Articles for the Command Line Switches you want to use. This articles are for Windows XP but works for Windows 7 as well.

    Explorer.exe Command-Line Options for Windows XP

    How To Customize the Windows Explorer Views in Windows XP

    **Note:**To open “Computer” you need to use the following command.

    explorer /e,


    Regards,

    Syed N – Microsoft Support


    Visit our Microsoft Answers Feedback Forum and let us know what you think.

    1 person found this answer helpful.
    0 comments No comments