System32 is in path, but commands not found for cmd prompt

Discussion in 'Windows 10' started by DeathStalker77, Mar 7, 2020.

  1. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    580
    43
    30
  2. ruuu7

    ruuu7 MDL Member

    Mar 7, 2015
    229
    49
    10
    Win+S -> ping google.com -> works like a charm.

    Win+S -> cmd -> right click -> run as an Administrator -> ping google.com -> works also
     
  3. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    #3 AveYo, Mar 7, 2020
    Last edited: Mar 7, 2020
    This PC - Properties - Advanced ( C:\Windows\system32\SystemPropertiesAdvanced.exe ) - Environment Variables
    edit/add if missing for both user and system:
    name=PATHEXT
    value=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

    or
    via cmd for user:
    setx.exe PATHEXT ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
    via cmd as admin for system:
    setx.exe PATHEXT ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" /M

    It's good practice anyway to type the .exe extension when using powershell since aliases could conflict with existing tools (example: sc)

    edit: forgot "or"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    580
    43
    30
    My PATHEXT already has all those variables. Using WIN+S closes the window immediately after running ping.exe, but DOES work (but no, it's not usable in that manner)

    Using ping.exe on PS w/Admin OR CMD STILL results in the same message.

    Running setx.exe PATHEXT ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" /M results in the same message.
     
  5. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    580
    43
    30
    Nope, that command doesn't work either

    It's not a HUGE deal, since there are websites and freeware that will do it, it's just annoying.
     
  7. AstonSmith

    AstonSmith MDL Novice

    Jun 27, 2015
    11
    5
    0
    It might be worth double checking that the path variable made it to the command prompt by running

    echo %PATH%

    and making sure that system32 is in there. Make sure all directory paths are correctly separated with semicolons as a typo can cause havoc.

    If all seems fine there maybe try some other program files that are in the path, e.g. if Java is installed and in the path then see if running java works. That'll help work out if the problem is with all paths or just system32.
     
  8. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    580
    43
    30
    >echo %path%
    C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Windows\System32\ipconfig.exe;C:\Windows\System32\ping.exe;C:\Users\XXXXXXX\AppData\Local\Microsoft\WindowsApps;
     
  9. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    files have no place to be on the %path%

    Try setting user path (back) to:
    C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\XXXXXXX\AppData\Local\Microsoft\WindowsApps;
    Try setting system path (back) to:
    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. DeathStalker77

    DeathStalker77 MDL Addicted

    Nov 8, 2009
    580
    43
    30
    nope, just did all that and still no difference.
     
  11. boyonthebus

    boyonthebus MDL Expert

    Sep 16, 2018
    1,168
    753
    60
    Here is what I have
    Code:
    C:\Users\username\Desktop>echo %PATH%
    C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Users\username\AppData\Local\Microsoft\WindowsApps;
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    But did you try creating a fresh account?
    Because if it happens on a fresh account, your whole system is compromised and you should do a repair install asap,
    before windows itself starts failing updates and maintenance tasks and you lose data
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...