Solved

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

Posted on 2007-11-27
7
5,858 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
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now