Posted by fred | Posted in IT General | Posted on 20-11-2011
Tags: #command, #explorer, #line, #MyComputer, #windows

The issue: One of the hotkeys of my keyboard should open an explorer window at the My Computer level.
The default command explorer.exe would open My Documents, so it needed to be parametrized.
The solution:
After playing with the parameters of explorer.exe (see http://support.microsoft.com/kb/152457), I came with the following solution:
explorer /n, /e, /select, c:\
I have been Googling for some other solutions and found this very interesting article about using the Windows CLSID namespace (full list of Windows 7 CLSID) to open the explorer window at various defined locations.
My Computer
%SystemRoot%\explorer.exe /E,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}My Documents
%SystemRoot%\explorer.exe /N,::{450D8FBA-AD25-11D0-98A8-0800361B1103}Recycle Bin
%SystemRoot%\explorer.exe /N,::{645FF040-5081-101B-9F08-00AA002F954E}Network Neighborhood
%SystemRoot%\explorer.exe /N,::{208D2C60-3AEA-1069-A2D7-08002B30309D}Default Web Browser or Navigator (IE, Firefox, Safari, Google Chrome)
%SystemRoot%\explorer.exe /N,::{871C5380-42A0-1069-A2EA-08002B30309D}Computer Search Results Folder
%SystemRoot%\explorer.exe /N,::{1F4DE370-D627-11D1-BA4F-00A0C91EEDBA}Network Search Results Folder
%SystemRoot%\explorer.exe /N,::{E17D4FC0-5564-11D1-83F2-00A0C90DC849}Web Folders
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{BDEADF00-C265-11D0-BCED-00A0C90AB50F}Control Panel
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}Printers and Faxes
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}Scanners and Cameras
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{E211B736-43FD-11D1-9EFB-0000F8757FCD}Fonts
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{D20EA4E1-3957-11d2-A40B-0C5020524152}Network Connections or My Network Place
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}Administrative Tools
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{D20EA4E1-3957-11d2-A40B-0C5020524153}Tasks Scheduler
%SystemRoot%\explorer.exe /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
