CMD Help

Discussion in 'Windows 7' started by TONPumper, May 20, 2011.

  1. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    I feel like a n00b posting this, but I didn't know what to search in Google because I don't know how to describe the problem in a few words. Here's the deal: when I ran cmd as an admin, it didn't have "C:\Windows\System32". Instead, it said, "E:\" then some folder from my external. How do I make it say "C:\Windows\System32"?
     
  2. tuvi123

    tuvi123 MDL Addicted

    Jul 29, 2009
    629
    85
    30
    run CMD as administrator (the default location is C:\Windows\System32)
    also you can run cd C:\Windows\System32 tochange the location.
     
  3. willko

    willko MDL Member

    May 14, 2008
    129
    13
    10
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. R29k

    R29k MDL GLaDOS

    Feb 13, 2011
    4,650
    4,225
    150
    1) Just type C: and enter that or;
    2) Browse to the System32 folder and hold down shift on keyboard and right click the folder, you should see open command window here menu.
     
  5. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    #6 TONPumper, May 20, 2011
    Last edited: May 20, 2011
    (OP)
    No, that is what happens when I run cmd as an admin.

    This didn't work but thanks anyway.

    My concern is why is it doing this in the first place? It shouldn't be reading my external HDD. It only happens when I mount an iso file after right-clicking on the drive to mount it.
     
  6. racky29

    racky29 MDL Senior Member

    Aug 2, 2007
    285
    91
    10
    #7 racky29, May 20, 2011
    Last edited: May 20, 2011
    how are you running the cmd as admin, ive not heard of what you describe before

    but it might be best if you physically go to C:\Windows\System32 folder and find CMD.exe
    right click CMD.exe and Run As Administrator

    it should then show the system32 dir in cmd prompt, and there wont be any reason for it to show anything else

    but this command someone posted earlier should work ive just made sure it works
    open cmd.exe as admin an type
    cd c:\windows\system32

    also you can change directory's by typing

    CD..
    to go back a folder (that's cd dot dot, if anyone's got bad eyesight)

    and type
    CD WINDOWS
    CD System32

    to proceed to directorys you want

    the only thing i can think of that's causing your problem is if theres a CMD.exe in the E:\ Drive and your running that, anyway good luck
     
  7. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    #8 TONPumper, May 21, 2011
    Last edited: May 21, 2011
    (OP)
    All I'm doing to run it is by typing "cmd" in the Start Menu, right-clicking on it, and running it as an admin. Like I said, it only shows up as "[external drive letter]:\ . . . " whenever I right-click on my virtual CD drive and mount an iso file using PowerISO. I tried typing the command to change the directory, but it just didn't change. There was no message or anything, it just entered down a line with the "[external drive letter]:\ . . . " directory. A restart of the computer seems to fix the issue, and I guess I'll just mount iso files by right-clicking on the file itself and mounting it that way.
     
  8. willko

    willko MDL Member

    May 14, 2008
    129
    13
    10
    #9 willko, May 21, 2011
    Last edited by a moderator: Apr 20, 2017
    try this command

    cd /d c:\windows\system32

    The "/d" switch allows change of drive. cd alone allows change of directory.

    if you run cd /? you get:
    Code:
    Displays the name of or changes the current directory.
    
    CHDIR [/D] [drive:][path]
    CHDIR [..]
    CD [/D] [drive:][path]
    CD [..]
    
      ..   Specifies that you want to change to the parent directory.
    
    Type CD drive: to display the current directory in the specified drive.
    Type CD without parameters to display the current drive and directory.
    
    Use the /D switch to change current drive in addition to changing current
    directory for a drive.
    
    If Command Extensions are enabled CHDIR changes as follows:
    
    The current directory string is converted to use the same case as
    the on disk names.  So CD C:\TEMP would actually set the current
    directory to C:\Temp if that is the case on disk.
    
    CHDIR command does not treat spaces as delimiters, so it is possible to
    CD into a subdirectory name that contains a space without surrounding
    the name with quotes.  For example:
    
        cd \winnt\profiles\username\programs\start menu
    
    is the same as:
    
        cd "\winnt\profiles\username\programs\start menu"
    
    which is what you would have to type if extensions were disabled.
    Hope that helps

    PS - What is your comspec variable:

    Capture.JPG
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    #10 TONPumper, May 21, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    My comspec variable matches the picture.
     
  10. tomah

    tomah MDL Senior Member

    Sep 25, 2010
    408
    354
    10
    #11 tomah, May 21, 2011
    Last edited: May 21, 2011
    Not sure why mounting an ISO would cause this but, did you actually try what R29k said here? The "CD" commands are working but since you are on E, you will not see the result. Doing what R29k mentions should change your working drive to C and should get you to where you want.

    So first you type "C:" and then <ENTER> without the quotes. You should now be on C drive. Now, if you are not in "C:\Windows\System32", then type "cd \windows\system32" <ENTER> without the quotes, and you should be where you want to be.

    Just out of curiosity, if you do a DIR from the E directory that opens up, is there a CMD executable there? Perhaps there is a CMD on your E drive and and typing CMD at the START menu is actually finding and running the copy on your E drive. This is the only reason I can come up with as to why this would happen.
     
  11. R29k

    R29k MDL GLaDOS

    Feb 13, 2011
    4,650
    4,225
    150
    Here's another way , right click desktop and select new > shortcut in the location bar type %windir%\system32\cmd.exe. Now when the shortcut is created right click it and select properties and in the Start In bar you put %windir%\system32. This shortcut will always open to System32 .
     
  12. willko

    willko MDL Member

    May 14, 2008
    129
    13
    10
    #13 willko, May 21, 2011
    Last edited: May 21, 2011
    Hmmm, bit strange,.. there are so many ways to get dos prompt where you want and none seem to work for you.... All suggestions posted here should work.
    I wonder if PowerISO's virtual drive is influencing this... Does the same thing happen when PowerISO is not running?

    In the mean time here's yet another way (run from shell OR [windows key + R]):

    cmd /k cd /d "c:\Windows\system32"

    Any luck?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
  14. willko

    willko MDL Member

    May 14, 2008
    129
    13
    10
    #15 willko, May 21, 2011
    Last edited: May 21, 2011
    OK, so you can change drive and directory, its just the starting point of cmd that is problem.

    What is the output of command "set" from cmd prompt?
    What is contents of [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]?

    Here's a dump of my set command for example,.. its the HOMEDRIVE and HOMEPATH variables I curious about:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\willko>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\willko\AppData\Roaming
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=SABERTOOTH
    ComSpec=C:\Windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\willko
    LOCALAPPDATA=C:\Users\willko\AppData\Local
    LOGONSERVER=\\SABERTOOTH
    NUMBER_OF_PROCESSORS=8
    OS=Windows_NT
    Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
    \WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-St
    atic;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 26 Stepping 5, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=1a05
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\willko\AppData\Local\Temp
    TMP=C:\Users\willko\AppData\Local\Temp
    ULTRAMON_LANGDIR=C:\Program Files\UltraMon\Resources\en
    USERDOMAIN=SABERTOOTH
    USERNAME=willko
    USERPROFILE=C:\Users\willko
    windir=C:\Windows
    windows_tracing_flags=3
    windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log


    And here's my reg entry (just export the key and copy/paste):

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
    "CompletionChar"=dword:00000040
    "DefaultColor"=dword:00000000
    "EnableExtensions"=dword:00000001
    "PathCompletionChar"=dword:00000040
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    #16 TONPumper, May 22, 2011
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Yeah, like I said, it only happens when I mount something to the drive by right-clicking on the drive.

    Code:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    
    C:\Users\TONPumper>set
    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\TONPumper\AppData\Roaming
    asl.log=Destination=file
    CLASSPATH=.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=LAPTOP_OF_DOOM
    ComSpec=C:\Windows\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\TONPumper
    LOCALAPPDATA=C:\Users\TONPumper\AppData\Local
    LOGONSERVER=\\LAPTOP_OF_DOOM
    MOZ_PLUGIN_PATH=C:\Program Files\Tracker Software\PDF Viewer\Win32\
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\
    WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 13, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0f0d
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    ProgramFiles(x86)=C:\Program Files (x86)
    ProgramW6432=C:\Program Files
    PROMPT=$P$G
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    QTJAVA=C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\TONPumper\AppData\Local\Temp
    TMP=C:\Users\TONPumper\AppData\Local\Temp
    USERDOMAIN=LAPTOP_OF_DOOM
    USERNAME=TONPumper
    USERPROFILE=C:\Users\TONPumper
    windir=C:\Windows
    
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
    "CompletionChar"=dword:00000040
    "DefaultColor"=dword:00000000
    "EnableExtensions"=dword:00000001
    "PathCompletionChar"=dword:00000040
     
  16. willko

    willko MDL Member

    May 14, 2008
    129
    13
    10
    You're variables and reg entry look fine,...

    If you create a shortcut to cmd with target:
    C:\Windows\System32\cmd.exe
    and Start In:
    C:\Windows\System32
    and "Run as Administrator"
    does it still open on the external drive path while PowerISO is running? Hope not...

    Does it open in that directory no matter what ISO you mount?
    Anything in that directory that is related to PowerISO?

    Maybe PowerISO has some ini file values (or similar) that might temp change variables... Not used it myself.
    What does "set home" say when you run it from the prompt during PowerISO session? Still C: and \Users\TONPumper?

    Just trying to throw some questions around and maybe help you stumble on a clue,... Thats about all I know re: command.exe and directory invocation, I'm sure other members know a lot more than me on the subject. I suppose the "bright side" is that nothing appears broken, just annoying behavior - sorry I can't be more helpful.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. TONPumper

    TONPumper MDL Member

    Jan 2, 2011
    132
    5
    10
    Not to sound stubborn, but I should haven't to create a desktop icon for this issue. It's obviously a problem with PowerISO, but I don't see any type of settings file. Thanks for the help, all. Hopefully, there is an update for PowerISO or Windows that will correct the issue. Until then, I'll just use the work around.
     
  18. R29k

    R29k MDL GLaDOS

    Feb 13, 2011
    4,650
    4,225
    150
    TON the only thing I can think of is maybe there is some type of MRU stuff that is causing the prompt to open at the mount location.
     
  19. Oz

    Oz MDL Expert

    Sep 1, 2009
    1,041
    703
    60