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
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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?
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.
Answer accepted by question author
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
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.
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.
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?
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.