Solved

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

Posted on 2007-11-27
7
5,942 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Suggested Solutions

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

15 Experts available now in Live!

Get 1:1 Help Now