Problem with Batch file running in DOS prompt or CMD when opening it

In our Windows 8 Pro PC, we have a batch file that when we click on it we get the an "Application Error" (see pic below):

cmd.exe - Application Error
The application was unable to start correctly (0xc0000142). Click OK to close the application.
apps error

Yet in another user within the same PC batch file works.
rayluvsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
What is in the batch script?

~bp
rayluvsAuthor Commented:
Example of batch file:

taskkill /im AppleIEDAV.exe /t /f
taskkill /im AppleMobileDeviceService.exe  /t /f
taskkill /im APSDaemon.exe /t /f
taskkill /im CCleaner64.exe /t /f

Open in new window

Bill PrewIT / Software Engineering ConsultantCommented:
Okay, reading the original error more closely, I doubt it is even getting into the batch script.  Seems like CMD.EXE can't load.  I suspect something has gotten corrupted on that computer.

Have you tried another batch script, do all have the same problem?

Have you tried a system restore back to a know good restore point?

Have you tried repairing Windows?

~bp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

rayluvsAuthor Commented:
the same CMD.EXE is used by another user login with the same computer and works perfectly.
Bill PrewIT / Software Engineering ConsultantCommented:
Interesting, typically that error is caused by a system file type problem.

Could be an unwanted piece of malware in one users profile, or perhaps a copy of cmd.exe that isn't right.  I'd take a good look at all the C:\USERS file for that user to look for anything that could be causing a problem.

If you try to RUN cmd.exe from the Windows Run tool, does that error?  What about if you try to run COMMAND.COM?

~bp
rayluvsAuthor Commented:
cmd.exe from "Run" works.
Bill PrewIT / Software Engineering ConsultantCommented:
Try starting the bat from there, so RUN:

cmd /c "yourbatch.bat"

~bp
rayluvsAuthor Commented:
Just reread your entry ID: 40753990 regarding "Have you tried another batch script".  Just did it and it worked.  

Searching more into it Comodo firewall somehow has it blocked.  So we just deleted it and recreated and it worked!

Thanx!
Bill PrewIT / Software Engineering ConsultantCommented:
Excellent, glad you tracked that down, and glad some of my thoughts were helpful!

~bp
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.