Clobbered cmd.exe!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dbenham
Expert
Posts: 2461
Joined: 12 Feb 2011 21:02
Location: United States (east coast)

Clobbered cmd.exe!

#1 Post by dbenham » 11 Apr 2021 19:44

WTF :shock: :!: :evil:

I just discovered my cmd.exe is suddenly missing, as are all my utility files that I keep in d:\utils and include in my PATH. God only knows what else is amiss. I did manage to find a copy of cmd.exe in Windows\SysWOW64.

I think it happened a couple weeks ago when my computer suddenly whacked out, and I had to restart. At that time a bunch of music production software that I use had lost all their settings, and I had to restore the settings - not too bad. But I hadn't done any batch in a while (Lately I've been obsessing over synthesizers - specifically VCV Rack - a software emulation of the Eurorack standard.)

But then today I went to run cmd.exe and the shortcut was dead!

Here is my system at the moment

Code: Select all

 INFO.BAT version 1.5
--------------------------------------------------------------------------------
Windows version        :  Microsoft Windows [Version 10.0.19041.867]
Product name           :  Windows 10 Home, 64 bit
Performance indicators :  Processor Cores: 8      Visible RAM: 16577856 kilobytes

Date/Time format       :  (mm/dd/yy)  Sun 04/11/2021  21:28:54.87
__APPDIR__             :  C:\Windows\SysWOW64\
ComSpec                :  C:\WINDOWS\system32\cmd.exe
PathExt                :  .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Extensions             :  system: Enabled   user: Disabled
Delayed expansion      :  system: Disabled  user: Disabled
Locale name            :  en-US       Code Pages: OEM  437    ANSI 1252
DIR  format            :  04/05/2021  07:16 PM     2,818,572,288 pagefile.sys
Permissions            :  Elevated Admin=No, Admin group=Yes

                          Missing from the PATH environment: C:\Windows\SysWOW64\wbem
                          Missing from the PATH environment: C:\Windows\SysWOW64\WindowsPowerShell\v1.0
                          Missing from the tool collection:  debug
Any suggestions on how to look for more damage, or what my next step should be?

Could McAfee have somehow gotten confused and deleted/isolated some files? Maybe some malware? Very weird.


Dave Benham

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Clobbered cmd.exe!

#2 Post by ShadowThief » 12 Apr 2021 01:52

If you haven't installed anything weird recently, it may be worth checking your hard drive's health. Download a disk health program like CrystalDiskInfo (https://crystalmark.info/en/software/crystaldiskinfo/) and make sure everything looks normal (or in this case, that all the dots are blue).

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Clobbered cmd.exe!

#3 Post by Squashman » 12 Apr 2021 18:18

Any chance you can restore to a previous restore point?

I know on previous versions of Window the backup functionality blew chunks but it has worked flawlessly for me since I started using it with Windows 7. It has saved me butt a few times when drives failed.

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: Clobbered cmd.exe!

#4 Post by Compo » 12 Apr 2021 19:05

Have you tries the basics, as administrator, before resorting to a System Restore?

Code: Select all

sfc.exe /ScanNow

Code: Select all

Dism.exe /Online /Cleanup-Image /CheckHealth

Code: Select all

Dism.exe /Online /Cleanup-Image /ScanHealth

Code: Select all

Dism.exe /Online /Cleanup-Image /RestoreHealth

IcarusLives
Posts: 175
Joined: 17 Jan 2016 23:55

Re: Clobbered cmd.exe!

#5 Post by IcarusLives » 14 Apr 2021 11:41

Compo wrote:
12 Apr 2021 19:05
Have you tries the basics, as administrator, before resorting to a System Restore?

Code: Select all

sfc.exe /ScanNow

Code: Select all

Dism.exe /Online /Cleanup-Image /CheckHealth

Code: Select all

Dism.exe /Online /Cleanup-Image /ScanHealth

Code: Select all

Dism.exe /Online /Cleanup-Image /RestoreHealth
He's unable to access cmd.exe

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: Clobbered cmd.exe!

#6 Post by Compo » 14 Apr 2021 12:08

IcarusLives wrote:
14 Apr 2021 11:41
He's unable to access cmd.exe
I'm sorry IcarusLives, but I clearly read the opening post, where it was stated that there was a copy of cmd.exe in the x86 application location, \SysWOW64.

Both sfc.exe and dism.exe also have x86 versions in \SysWOW64, hence my advice.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Clobbered cmd.exe!

#7 Post by Squashman » 14 Apr 2021 19:43

IcarusLives wrote:
14 Apr 2021 11:41
He's unable to access cmd.exe
All those commands are executables. You can open up a run box and execute them. WinKey + R.

jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: Clobbered cmd.exe!

#8 Post by jfl » 16 Apr 2021 15:36

Or you can open a PowerShell. You don't need cmd for that. Then everything will be usable normally, except batch files.

Post Reply