Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / C#
Tip/Trick

Show MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click

Rate me:
Please Sign up or sign in to vote.
3.83/5 (12 votes)
24 May 2011CPOL 30.8K   10   6
MyComputer, ControlPanel, RecycleBin, NetworkPlaces on Button Click
In the button click event, type the following code.
The My Computer or Windows Explorer window will pop up.
Process MyComp = new Process();
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{20d04fe0-3aea-1069-a2d8-08002b30309d}");
MyComp.Start();


For showing ControlPanel, just change the arguments with this one:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");


For showing RecycleBin:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{645FF040-5081-101B-9F08-00AA002F954E}");


For showing NetworkPlaces:
MyComp.StartInfo = new ProcessStartInfo("Explorer.exe", "::{208D2C60-3AEA-1069-A2D7-08002B30309D}");

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionHow about running in .net web application? Pin
Member 1312277011-Aug-17 0:42
Member 1312277011-Aug-17 0:42 
GeneralI guess it is for windows app only not web, right? Pin
Sunita Pandey24-May-11 8:30
Sunita Pandey24-May-11 8:30 
GeneralNice code Pin
jose pio24-May-11 2:45
jose pio24-May-11 2:45 
GeneralCool Pin
blues10030-May-11 21:32
blues10030-May-11 21:32 
Generalrequest Pin
dmjm-h25-May-11 5:15
dmjm-h25-May-11 5:15 
GeneralNice Pin
blues10023-May-11 21:13
blues10023-May-11 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.