This type of shortcuts (Namespace shortcuts) can be created using explorer.exe command line parameters:
EXPLORER.EXE [/n] [/e] [,/root,{object}] [[,/select],{sub object}]
/n - Opens a new "My Computer" view of the object, even if already open.
/e - Opens an "Explorer" view of the object.
/root,{object} - The specified root for the display. Explorer.exe /e,/root,D:\ will open an "Explorer" view of the D: drive.
/select,{sub object} - The specified folder or file receives focus. Explorer.exe /select,C:\WinNT\System32\Regedt32.exe will open a window view of C:\WinNT\System32 and the NT Registry Editor will receive focus. To do the same with an "Explorer" view, Explorer.exe /e,/select,C:\WinNT\System32\Regedt32.exe
For creating shortcut to "My computer" use Explorer /E,::{20D04FE0-3AEA-1069-A2D8-08002B30309D} as shortcut target.
Some other "standard" Namespaces CLSID (you can find even more in HKEY_CLASSES_ROOT\CLSID):
- My documents: Explorer /N,::{450D8FBA-AD25-11D0-98A8-0800361B1103}
- Control Panel: Explorer /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}::{21EC2020-3AEA-1069-A2DD-08002B30309D}
- Printers and faxes: Explorer /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}::{21EC2020-3AEA-1069-A2DD-08002B30309D}::{2227A280-3AEA-1069-A2DE-08002B30309D}
- Scanners and cameras: Explorer /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}::{21EC2020-3AEA-1069-A2DD-08002B30309D}::{E211B736-43FD-11D1-9EFB-0000F8757FCD}
- Administration tools: Explorer /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}::{21EC2020-3AEA-1069-A2DD-08002B30309D}::{D20EA4E1-3957-11d2-A40B-0C5020524153}
- Task Scheduler: Explorer /N,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}::{21EC2020-3AEA-1069-A2DD-08002B30309D}::{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
- Recycle Bin: *Explorer /N,::{645FF040-5081-101B-9F08-00AA002F954E}
- Default Web browser: Explorer /N,::{871C5380-42A0-1069-A2EA-08002B30309D}*
So for creating your own shortcuts if such type theoreticaly you should create/register your custom CLSID. It's from area of programming (COM related) and i'm not 100% sure about it...
this is great info, thank you, i just have one more question, shortcuts like this where are they stored? I mean physical path in a folder – ikel – 2011-11-29T16:50:16.717
The shortcut is stored as a .lnk file in the directory where they appear. So if you create one in your Desktop, it's in the Desktop folder. If you create one in C:\Folder, it's in C:\Folder. – None – 2011-11-29T18:50:39.567
you are talking bout regular shortcut, i was referring to special shortcut that's generated automatically by system. if you go to desktop folder and type dir, you dont see any .lnk file for My Computer – ikel – 2011-11-29T21:37:54.883
System shortcuts (like 'My computer") are predefined and preconfigured in windows registry (as 'build-in' shell feature). But if you will create custom shortcuts according to scheme specified above - it will appears as regular .lnk shortcuts (but with additional features like properties and so on). – Sergey – 2011-11-30T07:05:56.947