Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Windows Explorer Command Line

14 Sep 2010   #1

Windows 7
 
 
Windows Explorer Command Line

On one of my PCs running Windows 7 Pro 32 bit I'm getting odd behavior when I use command line switches for Windows Explorer.

When I create a shortcut with the following command line it works perfectly everytime: C:\Windows\explorer.exe An normal Explorer window opens.

If I create a shortcut with the following command line it rarely works. It starts but just hangs and no Explorer window opens: C:\Windows\explorer.exe /e,c:\

That switch at the end of the command line should cause an Explorer window to open with the C: drive selected on the left pane. That's exactly what it does on all of my PCs except one.

Obviously something is set differently on this one PC but I don't know what. Any clues appreciated.

(I have Windows search & indexing turned off on all of my PCs.)

Thanks.
Peter


My System SpecsSystem Spec
.

14 Sep 2010   #2

Windows 7 Ultimate x64 SP1
 
 

You have a small error in the syntax. You need quotes around the path. Here's mine:

%windir%\explorer.exe /e, "D:\"
My System SpecsSystem Spec
14 Sep 2010   #3

 
 

Quote   Quote: Originally Posted by DeaconFrost View Post
You have a small error in the syntax. You need quotes around the path. Here's mine:

%windir%\explorer.exe /e, "D:\"
Good call, but if I remember back to the days I used command line switches often I think the "," needs to be removed also

should look something like

%windir%\explorer.exe /e "D:\"


OS
My System SpecsSystem Spec
.


14 Sep 2010   #4

Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
 
 

Nah..

C:\Windows\explorer.exe /e,c:\ works perfectly well, no change required.
My System SpecsSystem Spec
14 Sep 2010   #5

 
 

Quote   Quote: Originally Posted by Bill2 View Post
Nah..

C:\Windows\explorer.exe /e,c:\ works perfectly well, no change required.
Fair comment, i've always had to remove "," lol
My System SpecsSystem Spec
14 Sep 2010   #6

Windows 7
 
 

Quote   Quote: Originally Posted by DeaconFrost View Post
You have a small error in the syntax. You need quotes around the path. Here's mine:
%windir%\explorer.exe /e, "D:\"
DeaconFrost:

Thanks for the suggestion but that didn't fix the problem. I have never needed to use quotes around any part of the command line including the path.

I've been using that syntax for the command line for years on WinXP and Windows 7 with no trouble except for this one Windows 7 machine. That tells me it's something about that particular PC but I have no idea what it is.

Peter
My System SpecsSystem Spec
14 Sep 2010   #7

Windows 7
 
 
Additional Information

I just tried something which may begin to narrow down my problem.

This command line does not work:

c:\windows\explorer.exe /e,C:\

This command line does work:

c:\windows\explorer.exe /e,D:\

So it is particular to the C drive on this one PC. I have checked the drive for errors and none were found but hopefully this is a clue.

Peter
My System SpecsSystem Spec
14 Sep 2010   #8
Microsoft MVP

Vista and now 7 in 32 and 64 bit.
 
 

Well, to chuck in my spanner. I have, and I think it is needed, a space beteween e, and C:

copied: C:\Windows\explorer.exe /e, /n, C:\
Works for me!
My System SpecsSystem Spec
14 Sep 2010   #9

Windows 7 Ultimate x64 SP1
 
 

I have to add as well, that I just tried on my system, and the C drive example from post #7 worked fine for me as well.
My System SpecsSystem Spec
14 Sep 2010   #10

Windows 7 Pro 64
 
 

Peter, I didnt see any mention of what results you DO get--any error? just nothing? Also, are you using a desktop shortcut, or a "pinned to the taskbar" shortcut? I have found some small differences in the way a desktop shortcut responds compared to a Pinned shortcut.

It almost sounds as if you maybe do not have permission to C: on that computer. Grasping at straws, I doubt it will make any difference, but I have been using this:
C:\Windows\explorer.exe /select,c:\users
My System SpecsSystem Spec
Reply

 Windows Explorer Command Line




Thread Tools



Similar help and support threads for2: Windows Explorer Command Line
Thread Forum
Windows Management Instrumentation Command Line Performance & Maintenance
Windows 7 x86 (Question about Rundll32 Command Line) General Discussion
Solved Windows Backup command line Backup and Restore
How To Back Up My Windows 7 Command Line Backup and Restore
Windows Update by Command Line Windows Updates & Activation
AIK windows 7(Boot livefrom usb like BartPE) only have command line?? Virtualization
Internet Explorer 9 installer command line switches Browsers & Mail

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:49 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33