Click here to Skip to main content
16,013,465 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
To open a notepad, we write its exe file like this
C#
Process.Start("IExplore.exe");

Similarly i want to know the exe file names of my computer, my documents and recycle bin.
Posted

 
Share this answer
 
v2
Comments
Sweety Khan 1-Nov-11 6:27am    
ok i tried this
Environment.SpecialFolder special = Environment.SpecialFolder.MyComputer;
string folderLocation = Environment.GetFolderPath(special);
Process.Start(folderLocation);
but it gives error "Cannot start process because a file name has not been provided"
Mehdi Gholam 1-Nov-11 6:58am    
Process.Start("explorer.exe", "/e, \"" + folderLocation + "\"");
Sweety Khan 1-Nov-11 21:59pm    
thanks :)
To open My computer use
C#
Process.Start("explorer.exe"); and pass parameters /n, /e,



To open My Documents use
C#
Process.Start("explorer.exe");
 
Share this answer
 
Comments
Sweety Khan 1-Nov-11 5:54am    
what is the meaning of /n here? when i wrote Process.Start("explorer.exe","/n"); it opens my documents.
and Process.Start("explorer.exe"); opens libraries.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900