Windows Explorer Command Line

Page 1 of 3 123 LastLast

  1. Posts : 31
    Windows 7
       #1

    Windows Explorer Command Line


    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


  2. Posts : 5,795
    Windows 7 Ultimate x64 SP1
       #2

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

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


  3. Posts : 6,305
    Windows 7 Ultimate x64
       #3

    DeaconFrost said:
    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


  4. Posts : 5,056
    Windows 7 x64 pro/ Windows 7 x86 Pro/ XP SP3 x86
       #4

    Nah..

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


  5. Posts : 6,305
    Windows 7 Ultimate x64
       #5

    Bill2 said:
    Nah..

    C:\Windows\explorer.exe /e,c:\ works perfectly well, no change required.
    Fair comment, i've always had to remove "," lol
      My Computer


  6. Posts : 31
    Windows 7
    Thread Starter
       #6

    DeaconFrost said:
    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


  7. Posts : 31
    Windows 7
    Thread Starter
       #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


  8. Posts : 748
    Vista and now 7 in 32 and 64 bit.
       #8

    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


  9. Posts : 5,795
    Windows 7 Ultimate x64 SP1
       #9

    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


  10. Posts : 83
    Windows 7 Pro 64
       #10

    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


 
Page 1 of 3 123 LastLast

  Related Discussions
Our Sites
Site Links
About 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 02:28.
Find Us