# (0xc0000142) Error



## PoWn3d_0704 (Aug 17, 2009)

So, basically there has been this error that has stopped Command Prompt from running. Everytime i go to launch it, i get the (0xc0000142) error. I haven't got a clue as to whats happening, and most forums I find on this are from 2005.


----------



## Stephen Bowles (Jan 28, 2011)

Have you tried right clicking on cmd.exe and running as Administrator?

Try running a scan disk by 
> going to "Computer" from the Start menu
> right clicking on the C:\ drive (asuming this is your primary drive)
> Go to properties and the tab tools
> Click on the "Check Now" button in the Error-checking area
> Tick/select the check box that stats "Automatically fix file system errors" then click start

If that does work, you will have to restart your system.

----

Try booting to safe mode to see if command prompt works then.

----



Perhaps try what 'JohnthePilot' suggests in this thread: http://www.techsupportforum.com/forums/f10/solved-error-0xc0000142-178253.html

Or Jenae here: http://www.techsupportforum.com/forums/f217/cannot-use-command-prompt-471244.html


----------



## PoWn3d_0704 (Aug 17, 2009)

Sorry for this taking so long to reply Stephen, times are crazy with X-Mas and all. The (0xc0000142) error still happens in Safe Mode, and when attempting to run as an admin. As for the disk check, I'm doing that right now.


----------



## Stephen Bowles (Jan 28, 2011)

That's all good, I know how hard it can be to find time.

Do say how it goes.


----------



## PoWn3d_0704 (Aug 17, 2009)

Disk Check came up with zero errors. I also ran AVG PC Tuneup and it found almost 5,000 various errors. I let it fix them all, but the (0xc000142) error is still occurring.

The simple fact that it runs in safe mode points to a core Windows file or process, doesn't it?

Thanks for your patience, Stephen.


----------



## Stephen Bowles (Jan 28, 2011)

PoWn3d_0704 said:


> ...The simple fact that it runs in safe mode points to a core Windows file or process, doesn't it?...


This problem usually points towards a .DLL issue, but I'm not too sure at the moment (especially if it is only cmd.exe that is playing up).

-----

Could I ask for a few more bits of information please.

> Does this error only happen when you open cmd? Has it occurred with anything else?

> Is this error just a little message box that appears? Stating something along the lines of "The application failed to initialize properly (0xc0000142) Click on OK to terminate the application."

If the above is true, try running *System File Checker*, it has a good chance of fixing your problem (although this may not work if cmd.exe is being a pain, read below).

> Did you do anything before this started happening? Such as just install a new anti-virus or downloaded something? Perhaps even since last time you run cmd.exe

-----

To run SFC:
> - Click on the Start globe/button
> - type sfc.exe /scannow and it should appear in the menu
> - Right click and run as administrator

Unfortunately if you cannot run cmd.exe this might not work, but maybe it will...


----------



## PoWn3d_0704 (Aug 17, 2009)

I have already tried to run the sfc.exe /scannow, and you are correct in saying that it does NOT run. Gives me the same (0xc0000142) error.

Yes, just a little message box as you said.

The same error has occured with trying to run Handbrake, (a video converter) and while trying to install a stupid little game called Rock of Ages. The error on Rock of Ages didn't actually affect anything, it still installed correctly.

Handbrake doesn't work at all.

I uninstalled Avast Antivirus, and installed AVG Free recently. As for downloads, I download all the time... But I scan everything and never have had an issue.


----------



## Stephen Bowles (Jan 28, 2011)

Thank you for the extra information.

If, this problem was not around before installing AVG, then try uninstalling AVG and/or using System Restore to go back to a point before AVG was installed.


----------



## PoWn3d_0704 (Aug 17, 2009)

Unfortunately, it was an issue before AVG.


----------



## Stephen Bowles (Jan 28, 2011)

Sounds like this problem has been with you a long time...

You say you scan everything you download, but when was the last time you run a full system anti-virus scan? Perhaps try this now (and perhaps run an anti-malware scan, using something such as "Malwarebytes"), just in case it is something in the background creating problems and interfering.

If the above doesn't help and if you have a Windows 7 disc around, try booting that disc, going into Windows Recovery Environment (repair), then command prompt, and enter the command chkdsk c: /r followed by sfc /scannow (restart may be required between the two operations).

If that isn't an option (or if it doesn't fix your problem), you will need to look in the event logs, see if the above helps/is possible first.


----------



## jenae (Jun 17, 2008)

Hi, could be a assoc problem, run the attached .zip file, double click on the returned .reg file and agree to add it to the registry, perfectly safe as it returns defaults. Restart computer. 

View attachment Default_CMD (1).zip


----------



## PoWn3d_0704 (Aug 17, 2009)

I've been ignoring the issue for awhile now, but I've decided to do something about it. Honestly, my system is super clean. I have 1TB of games and files and etc, and then a 640GB Boot drive that is mostly drivers, games and utilities.

A super clean install, not all bogged down yet.
I'm trying what was suggested by jeane, and then I'll try malwarebytes.


----------



## PoWn3d_0704 (Aug 17, 2009)

Well, I didn't restart my PC before I started the MalwareBytes. Silly me. So during a quick scan, the PC came up clean, and now after 40 full minutes of a full scan on my C drive it has detected 1 object.

It hasn't even started on my G drive, that that one is a full Terabyte of data.


----------



## PoWn3d_0704 (Aug 17, 2009)

Malwarebytes Anti-Malware 1.60.0.1800
Malwarebytes : Free anti-malware, anti-virus and spyware removal download

Database version: v2012.01.02.04

Windows 7 x64 NTFS
Internet Explorer 8.0.7600.16385
John :: JOHN-PC [administrator]

02/01/2012 10:42:49
mbam-log-2012-01-02 (10-42-49).txt

Scan type: Full scan
Scan options enabled: Memory | Startup | Registry | File System | Heuristics/Extra | Heuristics/Shuriken | PUP | PUM
Scan options disabled: P2P
Objects scanned: 768924
Time elapsed: 1 hour(s), 46 minute(s), 54 second(s)

Memory Processes Detected: 0
(No malicious items detected)

Memory Modules Detected: 0
(No malicious items detected)

Registry Keys Detected: 0
(No malicious items detected)

Registry Values Detected: 0
(No malicious items detected)

Registry Data Items Detected: 0
(No malicious items detected)

Folders Detected: 0
(No malicious items detected)

Files Detected: 5
G:\XP 1TB Shared\Games\Battlefield 1942 Copy and Play\Mods\Desert Combat\UT crack\Engine.dll_patch3186.exe (Trojan.Bancos) -> No action taken.
G:\XP 1TB Shared\Games\Battlefield 1942 Copy and Play\Mods\Desert Combat\UT crack\IpDrv.dll_patch3186.exe (Trojan.Bancos) -> No action taken.
G:\XP 1TB Shared\Games\Battlefield 2\EA Games Generic Keygen 180 - By FFF.exe (RiskWare.Tool.CK) -> No action taken.
G:\XP 1TB Shared\Games\Call of duty 4 [PC-DVD] [English] [www.topetorrent.com]\crack\rzr-cod4.exe (Trojan.Agent.CK) -> No action taken.
C:\Users\John.John-PC\Desktop\Folders\EA Games Generic Keygen 180 - By FFF.exe (RiskWare.Tool.CK) -> Quarantined and deleted successfully.

(end)


----------



## PoWn3d_0704 (Aug 17, 2009)

Little bump.

Oh, and I made the TSF gaming support team. YAY! :thumb:


----------



## PoWn3d_0704 (Aug 17, 2009)

I'm sad that i cant figure this out...


----------



## Stephen Bowles (Jan 28, 2011)

Congratulations on the appointment.

Apologies for no reply, I was waiting for you to reply to what Jenae requested.

I'm guessing that didn't work?


----------



## Stephen Bowles (Jan 28, 2011)

You could try downloading cmd.exe www.mermeliz.com/download/cmd.zip see if that runs.



Stephen Bowles said:


> ....
> If the above doesn't help and if you have a Windows 7 disc around, try booting that disc, going into Windows Recovery Environment (repair), then command prompt, and enter the command chkdsk c: /r followed by sfc /scannow (restart may be required between the two operations)....


Did you/can you try this? Booting with a Windows 7 disc you might be able to run commands from there. Most systems purchased often come with a repair disc, do you have one lying around?

----

Could you also give some more information about your system, its specs, what version of Windows 7 you are running, have you installed any service packs?, etc.


----------



## PoWn3d_0704 (Aug 17, 2009)

Well, I'm on my phone at the moment, so my signature is basically my system. It's all custom built, of course.

And that's what I'll try when I get home, booting off my Windows disk. Then repairs or something.


----------



## jenae (Jun 17, 2008)

Hi, access the RE (recovery environment) in seven it should be included from safe mode select "repair your computer" OR do the same if booting from a OS dvd.

Select command prompt:- (we need to determine what drive letter the RE has assigned to the OS, not always the one you have, so)

At command prompt (x: sources) type:- 
bcdedit | find “osdevice” (Must inc”) (press enter).

Now use the returned as the drive letter for OS assume C:

At the x sources type:- chkdsk c:/r (press enter), 5 stages of chkdsk will run.
can take awhile.

To run sfc/scannow
at the x: sources type:-
sfc/scannow /offbootdir=c:\ /offwindir=c:\windows (press enter)
sfc will run can take awhile


----------



## PoWn3d_0704 (Aug 17, 2009)

Scan is running, I will update you when it finishes.


----------



## PoWn3d_0704 (Aug 17, 2009)

2012-01-10 23:11:43, Info CBS Starting TrustedInstaller initialization.
2012-01-10 23:11:43, Info CBS Loaded Servicing Stack v6.1.7601.17592 with Core: C:\Windows\winsxs\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17592_none_672ce6c3de2cb17f\cbscore.dll
2012-01-10 23:11:43, Info CBS Failed to create backup log cab. [HRESULT = 0xc0000142 - Unknown Error]
2012-01-10 23:11:44, Info CSI [email protected]/1/11:07:11:44.260 WcpInitialize (wcp.dll version 0.0.0.6) called (stack @0x7fef4ecf0ad @0x7fef5e09849 @0x7fef5dd34e3 @0xfffbe94c @0xfffbd769 @0xfffbdaff)
2012-01-10 23:11:44, Info CSI [email protected]/1/11:07:11:44.263 WcpInitialize (wcp.dll version 0.0.0.6) called (stack @0x7fef4ecf0ad @0x7fef5e56816 @0x7fef5e22aac @0x7fef5dd35b9 @0xfffbe94c @0xfffbd769)
2012-01-10 23:11:44, Info CSI [email protected]/1/11:07:11:44.263 WcpInitialize (wcp.dll version 0.0.0.6) called (stack @0x7fef4ecf0ad @0x7fefa298738 @0x7fefa298866 @0xfffbe444 @0xfffbd7ae @0xfffbdaff)
2012-01-10 23:11:44, Info CBS Ending TrustedInstaller initialization.
2012-01-10 23:11:44, Info CBS Starting the TrustedInstaller main loop.
2012-01-10 23:11:44, Info CBS TrustedInstaller service starts successfully.
2012-01-10 23:11:44, Info CBS SQM: Initializing online with Windows opt-in: False
2012-01-10 23:11:44, Info CBS SQM: Cleaning up report files older than 10 days.
2012-01-10 23:11:44, Info CBS SQM: Requesting upload of all unsent reports.
2012-01-10 23:11:44, Info CBS SQM: Failed to start upload with file pattern: C:\Windows\servicing\sqm\*_std.sqm, flags: 0x2 [HRESULT = 0x80004005 - E_FAIL]
2012-01-10 23:11:44, Info CBS SQM: Failed to start standard sample upload. [HRESULT = 0x80004005 - E_FAIL]
2012-01-10 23:11:44, Info CBS SQM: Queued 0 file(s) for upload with pattern: C:\Windows\servicing\sqm\*_all.sqm, flags: 0x6
2012-01-10 23:11:44, Info CBS SQM: Warning: Failed to upload all unsent reports. [HRESULT = 0x80004005 - E_FAIL]
2012-01-10 23:11:44, Info CBS No startup processing required, TrustedInstaller service was not set as autostart, or else a reboot is still pending.
2012-01-10 23:11:44, Info CBS NonStart: Checking to ensure startup processing was not required.
2012-01-10 23:11:44, Info CSI 00000004 IAdvancedInstallerAwareStore_ResolvePendingTransactions (call 1) (flags = 00000004, progress = NULL, phase = 0, pdwDisposition = @0x113f890
2012-01-10 23:11:44, Info CSI 00000005 Creating NT transaction (seq 1), objectname [6]"(null)"
2012-01-10 23:11:44, Info CSI 00000006 Created NT transaction (seq 1) result 0x00000000, handle @0x200
2012-01-10 23:11:44, Info CSI [email protected]/1/11:07:11:44.269 CSI perf trace:
CSIPERF:TXCOMMIT;296
2012-01-10 23:11:44, Info CBS NonStart: Success, startup processing not required as expected.
2012-01-10 23:11:44, Info CBS Startup processing thread terminated normally
2012-01-10 23:11:44, Info CSI 00000008 CSI Store 2488336 (0x000000000025f810) initialized
2012-01-10 23:11:44, Info CBS Session: 30199856_1178858124 initialized by client WindowsUpdateAgent.
2012-01-10 23:11:49, Info  CBS Trusted Installer signaled for shutdown, going to exit.
2012-01-10 23:11:49, Info CBS Ending the TrustedInstaller main loop.
2012-01-10 23:11:49, Info CBS Starting TrustedInstaller finalization.
2012-01-10 23:11:50, Info CBS Ending TrustedInstaller finalization.




It only ran for a few seconds i guess :/


----------



## PoWn3d_0704 (Aug 17, 2009)

Okay... So it's fixed. I don't have the slightest idea what I did, but I no longer have the application error, and CMD works fine.


----------



## Stephen Bowles (Jan 28, 2011)

Well done. Did you do anything extra that Jenae didn't say?


----------



## PoWn3d_0704 (Aug 17, 2009)

No sir, and I haven't the slightest idea what happened. I was discussing the problem in Teamspeak with my friends, and I went to pull up the error by launching CMD, but this time it worked. It's beyond me...


----------



## Stephen Bowles (Jan 28, 2011)

Strange...

Without an idea what you did it is hard to explain what the fix was. Sometimes a restart can fix this type of problem, but we'd assume you did this before your original post, so odd...

Good luck, do say if the problem returns.


----------



## PoWn3d_0704 (Aug 17, 2009)

Yes, I will. I'd had the problem for nearly 3 months, and there were numorous hardware changes in that time period too. Your guess is as good as mine at this point.


----------

