Solved

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

Posted on 2007-11-27
7
6,232 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

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…
AutoHotkey is an excellent, free, open source programming/scripting language for Windows. It started out as a keyboard/mouse macros product, but has expanded into a robust language. This article provides an introduction to it, with links to addition…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

724 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