Fix cmd.exe & dism.exe error 0xc0000142

Oussama -  
 Oussama -
Hello everyone,
-
I would like your help, please, thank you in advance, a procedure or a set of files available in a portable tool to repair cmd.exe and dism.exe as I am getting the error 0xc0000142. I would like these two modules to work independently without dependencies while I repair Windows if possible (before more radical measures like replacing registry files (software and system) with a copy); I prefer to manage to repair even if it's less clean).
-
An example when launching a program (those that want cmd.exe):
-
1 I also have this error; IE9, yes I want to reinstall it but it wants cmd and dism!
---------------------------
WindowsUpgradeAdvisor.exe - Ordinal not found
---------------------------
The ordinal 383 is not found in the dynamic link library iertutil.dll.
---------------------------
OK
---------------------------
-
2
---------------------------
cmd.exe - Application error
---------------------------
The application failed to start correctly (0xc0000142). Click OK to close the application.
---------------------------
OK
---------------------------
-
(Tip = Ctrl + c keys to copy dialog boxes with focus.)
-
Initially, it worked to open cmd.exe (and other files) from C:\Windows\System32 by renaming cmd.exe to cmd_old.exe and then copying cmd.exe from C:\Windows\SysWOW64, but now (after several manipulations that fix one side and cause problems on the other side), even this trick no longer works and it still does not work when the calling program needs a 64-bit version or vice versa. Safe mode (3 modes to choose from) changes nothing. Dism offline works again (yes (manipulations...)) from a console but not in Windows online.
-
Do you have a tool to make cmd.exe and dism.exe work?
-
For csc.exe too ...; I want an autonomous bypass without dependencies.
-
Noting that even repairing with a Windows 7 SP1 U media without any bug or exotic modification placed on the hard drive (easier and quicker for now as long as my PC boots into something usable without having to use the CD/DVD drive) hangs after a certain time during the first scan of settings and files to be backed up (the line after copying install.wim and the rest).
-
Using Shift + F10 with a Windows 7 SP1 U DVD in use (and on the Windows online to be repaired) to open a command prompt produces the same error 0xc0000142 = this means that a Windows 7 SP1 U DVD does not sufficiently supplant the online system if it has issues when trying to repair. (It is not possible to repair an offline installation with the Windows 7 SP1 U DVD (maybe with the next pack = SP2); and the repair actually consists of upgrading the same version + with the latest Service Pack already integrated.)
-
The '.msu' files unfortunately do not work autonomously (since they depend on the broken system to work; dism.exe + ngen.exe = 0xc0000142); I have fewer problems with '.msi' files (although) and Microsoft FixIt tools do not work as they call cmd.exe.
-
Oh yes, the annoying thing (one more), is that .NET Framework C:\Windows\Microsoft.NET\Framework\v2.0.50727 (especially, as it blocks csc.exe version 32 bit I believe) or version 3.0 / 3.5; or C:\Windows\Microsoft.NET\Framework64\v2.0.50727 (which gives me a bit fewer problems I think), cannot be installed or repaired because they are part of the system; at least installation from a downloaded version tells me that. The command ""%windir%\Microsoft.NET\Framework\v2.0.50727\ngen.exe update" to repair does not work = error 0xc0000142 for ngen.exe.
-
3
---------------------------
ngen.exe - Application error
---------------------------
The application failed to start correctly (0xc0000142). Click OK to close the application.
---------------------------
OK
---------------------------
-
Thank you Microsoft IN ADVANCE for making installation/repair programs autonomous (without getting an error 0xc0000142) and thank you for making autonomous FixIt http://support.microsoft.com/fixit/fr as well; see who works on an offline installation from WinRE or from another install!
-
And thank you for any eventual tip.
-
< config > Windows 7 SP1 U / Firefox 3.6.* (CAUSE 3.6 = ADDONS !) < / config >

1 answer

Oussama
 
Hello everyone

I solved this problem ;-))>

In fact, I think that some files that were locked and therefore not replaceable from the Windows 7 SP1 U DVD (on the hard drive) might have been causing issues.

From another rescue install; Windows 7 Home SP1 U:

I replaced all the files (not the subfolders except for some) (from and) since:

DVD Windows 7 SP1 U \sources\install.wim\2\Windows\System32\
DVD Windows 7 SP1 U \sources\install.wim\2\Windows\SysWOW64\
DVD Windows 7 SP1 U \sources\install.wim\2\Windows\servicing\

I renamed:

C:\Windows\security_old

And I replaced everything from:

DVD Windows 7 SP1 U \sources\install.wim\2\Windows\security

I also replaced everything by copying (from and) over from:

Rescue Install (WIN7SP1U) ?:\Windows\Microsoft.NET (C to D=C)

It’s resolved but not completely; there are still some messes to fix :-) !

Quickly: cmd.exe and dism.exe work but the install of ie9, although it’s a complete version, downloads indefinitely ie9 (EDIT: actually SFC /scannow was running, so it’s fine but ie9 tells me it didn’t finish the install correctly after asking if I wanted to close all open programs (no) or if I would restart later (yes); so I will restart the PC after this edit here, plus sfc tells me "Changes resulting from the repair of system files will take effect after the next restart." and everything is not fixed) and Microsoft Security Essentials is also stuck on updates = internal network settings issues I suppose, given that I have access to the web = Firefox works very well; Windows Update too. Oh, the diagnostic tools are working again since cmd.exe is working again.

!!! BEFORE ANY MODIFICATIONS; save your Windows license:

Valid for Windows 7 (and also for Windows Vista ...; not XP):

Save what’s in; hidden files/default protected:

C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\

tokens.dat

and in:

C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\Cache

cache.dat

These two files are also in the recovery partition (...) !

And also retrieve your OEM SLP Windows 7 key just in case:

(You can find it on the web since, an OEM SLP key is the same on all PCs of the same series = same brand of PC (each brand of PC has its keys) and a bit depending on the models of the brand’s PCs (I believe there are 2 or 4 keys or more; you need to find the right key corresponding to your PC). Note that the key on the sticker under your PC or behind your PC is unique = it’s not the same key as the OEM SLP key, don’t give it to anyone.)

WinfoKeys3.0.0.0

Installation key decoding

WINFOKEYS displays various information, such as the computer name, the username, administrator rights, the exact version of the system, the registered user's name and the company name. The latter can be modified. The software then displays the product key, its installation date (or important update), and automatically decodes the key allowing installation. An Export option allows you to create a winfokeys file containing all the data. This version offers to find the installation key of an inactive system (disk, partition, hive) or of a remote system. It is compatible with 64 bits (for local or remote system). The software does not require installation. It can be run from any media. Help is integrated.

MD5: 6b8e9ae06c1322a01471a651035d9939
CompatibilityWindows 9x-Me-2K-XP-Vista-7x86-x64

* 505 KB

Pierre Torris Home Page:
http://www.ptorris.com/crypto.php#winfokeys

Download WINFOKEYS for free | CommentCaMarche:
http://www.commentcamarche.net/download/telecharger-34055329-winfokeys

thank you
1
Oussama
 
Re

Well, upon restarting, I encounter the same problem...

See you later, maybe.
0
Oussama
 
Re

It's working again :-))

It's the SFC / Scannow that I ran which replaced some files for me...
The problem will return if I do nothing in the meantime before running SFC again...

I rebooted into the other installation to avoid being blocked by files in use and I *simply* replaced respectively in:

C:\Windows\SysWOW64
C:\Windows\System32

these two files:

kernel32.dll
KernelBase.dll

from:

DVD Windows 7 SP1 U \sources\install.wim\2\Windows\System32\
DVD Windows 7 SP1 U \sources\install.wim\2\Windows\SysWOW64\

Folder 2/4 = Windows 7 SP1 U Home Premium x64!

cmd.exe and dism.exe are working and the system did not crash on startup.

These two files are not the same as the ones causing issues.
It is not apparently a problem of bad hard drive sectors.

Microsoft = A questioning of knowledge at the scale of every fifteen minutes :-))

"Knowledge increases when shared! I can never thank Bill Gates enough for turning a relatively dull profession, based on a technical and rigorous approach to facts, into a daily challenge that requires constant questioning, all at the scale of every fifteen minutes."

See you later :-))
0
Oussama
 
Hello again everyone; feedback:

=> It doesn't seem necessary to replace the KernelBase.dll file!
=> It doesn't seem necessary to replace the files in C:\Windows\SysWOW64!

Just replace the C:\Windows\System32\kernel32.dll file!

This file is fine; cmd.exe or dism.exe can open without error 0xc0000142:

Windows 7 SP1 U x64 DVD EN \sources\install.wim\2\Windows\System32\kernel32.dll

CRC32: 2FA6DA84
MD5: 7A6326D96D53048FDEC542DF23D875A0
SHA-1: 5C02AF0206C299F5BCAB8DA4237CFC92E3E93495
SHA-256: 182351570856CD6EEDD9DF7E2FB8AB76BD4D8FC70BE11AD5DE6484CFD70C21C6

Property Value Copyright © Microsoft Corporation. All rights reserved. Description of the DLL file Windows NT BASE API Client Original file kernel32 Language English (United States) Modified on ?30/?09/?2011 ??15:53 Product name Microsoft® Windows® Operating System Size 1.10 MB Type Application Extension File version 6.1.7601.17651 Product version 6.1.7601.17651 


This version of C:\Windows\System32\kernel32 is not good = bad version:

SFC /SCANNOW reinstalls this version and for example cmd.exe no longer works upon reboot.

Maybe it’s the language of kernel32.dll that causes the problem and not the version?

>IE9 is poorly installed and can no longer be installed correctly; particularly the FR pack.

CRC32: 4F9F79FE
MD5: B9B42A302325537D7B9DC52D47F33A73
SHA-1: ADE184001D3B1D5CB68C5922428C6148303B63CD
SHA-256: 0B2E367D671073EFD70641A198C340B12B1BD813263050AE16B9C48B414775E0

Property Value Copyright © Microsoft Corporation. All rights reserved. Description of the Windows NT BASE API Client DLL Original file kernel32 Language English (United States) Modified on ?30/?09/?2011 ??15:53 Product name Microsoft® Windows® Operating System Size 1.10 MB Type Application Extension File version 6.1.7601.17651 Product version 6.1.7601.17651 


A follow-up from me here:
Folder C WINDOWS system32 unreadable = NVIDIA [Resolved] | CommentCaMarche:
http://www.commentcamarche.net/forum/affich-23290701-dossier-c-windows-system32-illisible-nvidia

Tip to copy dialog boxes that *refuse* to "Ctrl + C":
SysExporter: Grab data from list-view, tree-view, combo box, WebBrowser control, and text-box. :
http://www.nirsoft.net/utils/sysexp.html

Additional tip; very handy for checking file integrity = crc32 md5 sha-1:
HashTab tool to quickly find file hash information :
http://implbits.com/HashTab.aspx

"HashTab provides OS extensions to calculate file hashes. HashTab supports many hash algorithms such as MD5, SHA1, SHA2, RIPEMD, haval, and Whirlpool. HashTab is supported as a Windows shell extension and a Mac Finder plugin. HashTab provides an easy way to verify the integrity and authenticity of a file."

thank you
0