Windows Explorer Command Line

pmokover

New member
Local time
3:54 PM
Messages
31
On one of my PCs running Win7 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 Computer

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

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

My Computer

OS
Windows 7 Ultimate x64 SP1
CPU
Intel Core i7-2600
Motherboard
Gigabyte GA-P67A-UD3P-B3
Memory
12 GB Patriot Extreme DDR3-1333
Graphics Card(s)
Nvidia GTX 470
Monitor(s) Displays
Dell UltraSharp 2209WA
Hard Drives
OCZ Agility3 240 GB, WD5001AALS, WD7501AALS
PSU
OCZ ModStream 700W
Case
CoolerMaster HAF 912 Advanced
Cooling
CoolerMaster Hyper 212 Plus
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 Computer

Computer Manufacturer/Model Number
Compaq Desktop
OS
Windows 7 Ultimate x64
CPU
AMD Sempron Dual Core
Memory
3GB
Graphics Card(s)
NVIDIA GeForce 6150SE nForce 430
Screen Resolution
1024x768
Hard Drives
150GB Sata
Nah..

C:\Windows\explorer.exe /e,c:\ works perfectly well, no change required.
 

My Computer

Computer Manufacturer/Model Number
Too many to describe...
OS
Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
Nah..

C:\Windows\explorer.exe /e,c:\ works perfectly well, no change required.

Fair comment, i've always had to remove "," :huh: lol
 

My Computer

Computer Manufacturer/Model Number
Compaq Desktop
OS
Windows 7 Ultimate x64
CPU
AMD Sempron Dual Core
Memory
3GB
Graphics Card(s)
NVIDIA GeForce 6150SE nForce 430
Screen Resolution
1024x768
Hard Drives
150GB Sata
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 Win7 with no trouble except for this one Win7 machine. That tells me it's something about that particular PC but I have no idea what it is.

Peter
 

My Computer

OS
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 Computer

OS
Windows 7
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 Computer

Computer Manufacturer/Model Number
Three desktops and one laptop with good specs..
OS
Vista and now 7 in 32 and 64 bit.
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 Computer

OS
Windows 7 Ultimate x64 SP1
CPU
Intel Core i7-2600
Motherboard
Gigabyte GA-P67A-UD3P-B3
Memory
12 GB Patriot Extreme DDR3-1333
Graphics Card(s)
Nvidia GTX 470
Monitor(s) Displays
Dell UltraSharp 2209WA
Hard Drives
OCZ Agility3 240 GB, WD5001AALS, WD7501AALS
PSU
OCZ ModStream 700W
Case
CoolerMaster HAF 912 Advanced
Cooling
CoolerMaster Hyper 212 Plus
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 Computer

Computer Manufacturer/Model Number
Dell XPS17 laptop
OS
Windows 7 Pro 64
CPU
i7 2760QM 2.4GHz
Memory
8GB
Graphics Card(s)
Intel HD/Nvidia GeForce 555M
Sound Card
RealTek
Monitor(s) Displays
Ntrig DuoSense digitzer, touchscreen
Hard Drives
750GB
Mouse
Synaptics touchpad
C:\Windows\explorer.exe /e,c:\
From Bill2 post #4 works just fine for me.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home made Desktop
OS
Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
CPU
Intel i7-6800K @ 4.3
Motherboard
ASUS X-99 Deluxe II
Memory
Corsair Platinum 16 gig @2400
Graphics Card(s)
EVGA GTX 1070 OC
Monitor(s) Displays
Asus 27" LED LCD/VE278Q
Screen Resolution
1920-1080 or 1280-720 HDMI
Hard Drives
INTEL SSD 730-240 Gb Sata 3.0/
PSU
EVGA Platium 1200W
Case
Phanteks Luxe Tempered Glass 8 fans/ one radiator
Cooling
XSPC/ Water Cooled CPU
Keyboard
Das 4 Professional
Mouse
Logitech M705/MX Anywhere 2-S
Internet Speed
100 mbits
Antivirus
Microsoft Security Essentials/ Malwarebytes Premium 3.0/ SAS
Browser
I.E. 11 default/Firefox/ ISP Time Warner Cable/Spectrum
Other Info
LG BluRay Burner/
Sound system-KLipsch-THX/
Icy Dock ssd Hot Swap bays.
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

Periboob,

Thanks for the reply. I'm using a shortcut pinned to the taskbar but I've tried a shortcut on the desktop and I get the same result.

I do not get any error message. When I click the shortcut it looks like Explorer is starting to run but it never happens. If I look in Task Manager Processes I see the usual Explorer listed there plus a second one that uses only around 2K of memory. That's the one that started to load but didn't make it.

I also thought it sounded like a permissions or ownership problem but I've checked all of that and all seems to be as it should. I'm still not ruling that out but I don't know what else to check.

One other odd thing about this ... when I click the taskbar shortcut and Explorer does not open if I then repeatedly click the shortcut more often than not eventually it does open -- after maybe 5-7 clicks or so.

And every once in a while it all behaves as it should. I click the shortcut and Explorer opens (but that's rare).

Peter
 

My Computer

OS
Windows 7
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.

Confirmed. I just tried it (without the sopace, as I suggested) works fine. Also copying and pasting the OP's command switch works on my computer.
 

My Computer

Computer Manufacturer/Model Number
Three desktops and one laptop with good specs..
OS
Vista and now 7 in 32 and 64 bit.
Peter, did you say early on, implied at least, that if you use the default properties Target string, without the "/e," it works OK?

What happens if you run a commandline window and use the same string (or variations) there? Also, did you try swapping mice with another computer? That intermittent thing sure sounds like hardware, or at least a driver issue.
 
Last edited:

My Computer

Computer Manufacturer/Model Number
Dell XPS17 laptop
OS
Windows 7 Pro 64
CPU
i7 2760QM 2.4GHz
Memory
8GB
Graphics Card(s)
Intel HD/Nvidia GeForce 555M
Sound Card
RealTek
Monitor(s) Displays
Ntrig DuoSense digitzer, touchscreen
Hard Drives
750GB
Mouse
Synaptics touchpad
It came to me in a dream, that (in the old days) the "/e" was only there to open with the folder tree shown, because the default was to open explorer with only the contents pane. But the new version of Explorer remembers that I want the folder tree shown, so this seems to do what I want also (no "/e", no ",").

%windir%\explorer.exe J:\
 

My Computer

Computer Manufacturer/Model Number
Dell XPS17 laptop
OS
Windows 7 Pro 64
CPU
i7 2760QM 2.4GHz
Memory
8GB
Graphics Card(s)
Intel HD/Nvidia GeForce 555M
Sound Card
RealTek
Monitor(s) Displays
Ntrig DuoSense digitzer, touchscreen
Hard Drives
750GB
Mouse
Synaptics touchpad
I've tried everything I can think of but no change on this one PC. Explorer works perfectly on my other PCs. So clearly the problem is some setting on this PC.

Without any command line options Explorer works but with the command line option it works only occasionally (again, just on this one PC).

I don't even know where to go fishing to find the cause of that.

Peter
 

My Computer

OS
Windows 7
Well, it is something wrong with that machine. Not sure it is a setting. Did you try SFC like Bill2 recommended?

Since it seems intermittent, maybe it is hardware. did you try Windows Memory Diagnostic?

Are you ready for the nuclear option? (format and clean install)
 

My Computer

Computer Manufacturer/Model Number
Dell XPS17 laptop
OS
Windows 7 Pro 64
CPU
i7 2760QM 2.4GHz
Memory
8GB
Graphics Card(s)
Intel HD/Nvidia GeForce 555M
Sound Card
RealTek
Monitor(s) Displays
Ntrig DuoSense digitzer, touchscreen
Hard Drives
750GB
Mouse
Synaptics touchpad
Well, it is something wrong with that machine. Not sure it is a setting. Did you try SFC like Bill2 recommended?

Since it seems intermittent, maybe it is hardware. did you try Windows Memory Diagnostic?

Are you ready for the nuclear option? (format and clean install)

I did try SFC. No problems.

This is a fairly new (2 months) install so I'm not ready to do it again yet. My recollection is that I did not have this problem when I first setup Win7 on this machine. It started a couple of weeks later. So I really think it's something I did - some setting that I accidentally set wrong.

Peter
 

My Computer

OS
Windows 7
First, sorry for my bad english :(

I had exactly the same problem as pmokover.

It seems to be a problem with something related to user profile. I added a new user. I login into this user and windows explorer works as expected. I solved the problem deleting the user account and creating a new one. This is not a good solution but solve the problem (before deleting user account remember to backup your important files).

Possibly the origin of the problem is a misconfiguration in the windows registry. Perhaps with some tool that repare windows registry would be possible to restore correct behaviour of windows explorer... :o

bris
 

My Computer

OS
windows-linux
Back
Top