Solved

Batch (.bat) file to launch "My Computer" in Exporer.exe

Posted on 2007-11-27
7
6,174 Views
Last Modified: 2008-04-29
For example, if I want to  launch "My Documents" in Exporer.exe, I can do a batch (.bat) file that is:

start "" explorer "%HOMEPATH%\My Documents"


If I want to  launch Drive "C:\" in Exporer.exe, I can do a batch (.bat) file that is:

start "" explorer "C:\"


However, if I do:

start "" explorer "My Computer"

It does not work... What is the correct syntax?

Thanks.

Regards.
0
Comment
Question by:asgarcymed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 20362626
You need to refer to the CLSID - see http://www.jsifaq.com/SF/Tips/Tip.aspx?id=0824
0
 

Author Comment

by:asgarcymed
ID: 20362702
It is almost perfect - it launches "My Computer", but now a cmd.exe window continues opened; unlike the examples I posted:

start "" explorer "%HOMEPATH%\My Documents"

start "" explorer "My Computer"

Is there any way to such cmd.exe window be automatically be closed? Or it is impossible, and thus, I must close it manually (with a mouse click)?

Thanks.

Regartds.
0
 
LVL 2

Accepted Solution

by:
kram0 earned 400 total points
ID: 20362769
start "" explorer /e,/root,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

should work in the batch file...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:asgarcymed
ID: 20362828
Now it is PERFECT, THANK YOU!!

Regards.
0
 
LVL 2

Expert Comment

by:kram0
ID: 20362844
I only expanded on the answer that KCTS had given you...
0
 

Expert Comment

by:policywatcher
ID: 21384958
The problem with the solution given is that while it does display "My Computer" and while the text "My Computer" shows in the title bar, if the address bar is visible, it will show the CLSID rather than "My Computer".

I've recently seen a better solution :

explorer /n,/select,C:

That opens "My Computer", selects the drive C: icon, and displays "My Computer" in the address bar.

0
 

Author Comment

by:asgarcymed
ID: 21387700
Thank you! It works pretty fine! ;)

Regards.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question