Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: error 87 DISM command-line not working, cant do cleanup servicing

28 Feb 2017   #1

Windows 7 x64, Vista x64, 8.1 smartphone
error 87 DISM command-line not working, cant do cleanup servicing

DISM seems to be failing with error code after it was supplied with a valid command-line argument. Executing DISM /online /cleanup-image should return with operation successful. Instead the Deployment Imaging Service & Management Tool now reports there is an error while processing the command and returns error 87.

If I get error 87, I would have assumed it to be a typo made by me, so I would retype the command line with the correct spelling and try again.
Doing this with DISM /online /cleanup-image and still the same error returns.
DISM /online /cleanup-image
So then, at the cmd prompt, I press F3 to repeat the spelling of the previous command, and add " /?" to the end of line, the execution result successfully returns the DISM help options in the context of /cleanup-image.

So then I ask if DSIM is failing with commands other than help ("/?")? If I try other DISM /online commands, such as /get-intl or /get-features or /get-currentedition, then I find that these operations return successfully without error.

My System SpecsSystem Spec
11 Mar 2017   #2

Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10

Hello iko mate I am NO expert but a Google on this shows a slightly different command line prompt that you used - DISM /Online /Cleanup-Image /RestoreHealth I found this in this link but I am no expert like I said and do't know if this answers your query.
How to Repair Corrupted Windows System Files with the SFC and DISM Commands
My System SpecsSystem Spec
12 Mar 2017   #3

Windows 7 x64, Vista x64, 8.1 smartphone

Hello ICIT2LOL, many thanks for stopping by to answer my query. Googling "DISM" tends to bring lots Windows 10 and Windows 8 matches to the front of the search engine results. DISM featured in 8 or 10 is a part of the OS, and has more command line options to mount and service an image. Not all the options available in 8 or 10 are available on 7. To ensure I reach a win 7 tutorial, then searching "DISM Windows 7" gives more relevant tutorials in the results, I think.

DISM is available for win 7 as a download. I believe it is also called SURT in win 7. Yes, it says "Systems Update and Readiness Tool" in your linked article. (KB947821). What would happen if I uninstall KB947821 and re-install a new hotfix? Dunno.

DISM /online /cleanup-image should work on any of the applied versions of Windows, including my windows 7. DISM /online /cleanup-image /restorehealth has been only available with windows 8 or 10.

What would happen if I type "DISM /online /cleanup-image /restorehealth" into elevated command prompt of my Windows 7? Dunno ......... lets give it a go and see what happens ...... Oh, it says Error: 87 -- like before ---------------------- underneath the error is a bit of text saying "The restorehealth option is not recognized in this context. For more information, refer to the help." -- that info explanation tells me it doesn't like /restorehealth.

I pressed F3 to recall DISM /online /cleanup-image /restorehealth, and deleted the "/restorehealth" switch, then pressed enter. ....... and I got Error: 87 again. The blurb underneath "Error: 87" says "An error occured while processing the command. <new line> Ensure that the command-line arguments are valid. For more information, review the log file. <new line> The Dism log file can be found at C:\windows\logs\DISM\dism.log". I hadn't read that bit, I do confess - I supposed the command aborted.

Let see what the log file says .................. It is not very long (27 KB) ............................................... I dont know what I am looking for since I already know it aborted the operation ................................................................................... The first warning in the file is:
2017-03-12 18:39:01, Warning DISM DISM Provider Store: PID=6056 Failed to Load the provider: C:\Users\Admin\AppData\Local\Temp\438E156B-08AA-4362-A977-068EA2263242\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
--- does it make sense?? ha ha ha .... ............................. if I scroll down the text, i see There is also an Error flag :
2017-03-12 18:39:02, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=80070057 ................................... thats it ....... one warning ... and one error.
My System SpecsSystem Spec

12 Mar 2017   #4

Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10

Hmm does certainly look to me at least a convoluted setup and as you say the Googles do put up a lot of different links - I just picked the one that looked the most likely.

I am assuming you have done the sfc and chkdsk scans? Plus malware scans?
My System SpecsSystem Spec
12 Mar 2017   #5

Windows 7 x64, Vista x64, 8.1 smartphone

Thanks, it certainly was helpful to check the forums before posting.

Just now, I tried refining search, and looked for "SURT Error 87 PEPprovider.dll". Looking at the results, would seem PEPprovider.dll is part of SURT (DISM) and not part of the original Win 7 installation.

Most posts online that quote PEPprovider.dll as a source of their problem were using Windows 8 when it happened. Only Windows 8 generates a different DISM error to Windows 7 SURT.

I'll run sfc and chdsk again, as you suggest.
My System SpecsSystem Spec
13 Mar 2017   #6

Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10

Ok now some suggest the sfc is run for three runs as the first one is not all that reliable but it is a matter of choice.
My System SpecsSystem Spec
13 Mar 2017   #7
Layback Bear

Windows 7 Pro. 64/SP-1

Run sfc /scannow and if their is a problem/s found, reboot and run it again.
You must reboot after running sfc /scannow and problems are found.
Some problems are repaired with the reboot. Then run sfc /scannow again and reboot.
If the problems are not fixed after 3 runs and reboots of sfc /scannow then sfc /scannow can't fix the problem.

Most likely a Repair install is needed.

My System SpecsSystem Spec
13 Mar 2017   #8

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring

DISM only partially works on W7.

The reason, the restore online cleanup image is not supported,
Theres NOT an online W7 image.

Surt can be run at any time, the missing dll would mean that somethings wrong with it. Most unusual.

Try this alternative, copy/paste the output

My System SpecsSystem Spec
15 Mar 2017   #9

Windows 7 x64, Vista x64, 8.1 smartphone

Hokay, lets describe what has been going on, and show what results were obtained.

1) I booted the computer to initiate a Windows Startup Repair from the Recovery CD.

The result of the Repair showed: "Startup Repair could not detect a problem".

However directly underneath, it also went on to say "If you have recently attached a device to this computer, such as camera or portable music player, remove it and restart your computer. If you continue to see this message, contact admin/manufacture."

So I did the Startup repair again, and ... I got the same repair messages again.

2) Searching the web on this error message pointed to the anti-virus software. So, instead of running a routine anti-virus scan, I ran the MSRT (malicious software removal tool). While MSRT was running, it displayed a tally of up to ninety-odd files in the "Infected" field. However, when the MSRT finished scanning, it displayed zero Infected files. So what happened to the ninety-odd infected files counted during the scan progress? No idea.

3) CHKDSK showed no file or bad sector errors.

4) SFC /SCANNOW I ran three times now. The first time it discovered seven errors that it was able to fix. The second and third times did not show any more errors. I had rebooted the computer in between scans.

The repaired corrupted files are scrrun.dll, msftedit.dll, msscript.ocx, InkEd.dll, twunk_32.dll, twunk_16.exe, and expsrv.dll. One of the files is to do with Tablet Pen Input, while the others are to do with Scripting.

I suppose next would be to run DISM again, with same switches, and see if MSRT or SFC has fixed the issue?

Attached Files
File Type: txt sfcdetails.txt (48.1 KB, 4 views)
My System SpecsSystem Spec
15 Mar 2017   #10

Desk1 7 Home Prem / Desk2 10 Pro / Main lap Asus ROG 10 Pro 2 laptop Toshiba 7 Pro Asus P2520 7 & 10

Ok mate you mention that it asked for any devices you have hooked up at all so have there been any thta have required software to be downloaded for them??
Anyway run these please

SUPERAntiSpyware | Remove Malware | Remove Spyware - AntiMalware, AntiSpyware, AntiAdware!
Malwarebytes | Malwarebytes Premium
AdwCleaner Download
ADW download from bleeping computer delete any rubbish found with the malware scans
(NB If you are running Kaspersky as the main AV then it might need disabling it when trying ADW because it does not like it at times)
These are for any obvious malware for starters.

The AV you are running too is that Avast? if so I would disable it while you any more scans/checks etc (not the above of course)
My System SpecsSystem Spec

 error 87 DISM command-line not working, cant do cleanup servicing

Thread Tools

Similar help and support threads
Thread Forum
DISM error 87 "DISM /online ""command not recognized""
Hey, So im trying to clean up my PC, FRESH install w/current updates followed @BRINK guide to DISM and keep getting this error
Performance & Maintenance
DISM online scan cleanup error
I have svchost.exe running at 187,736 k which I assume is Windows update Tuesday for the month of March trying to push through. Updates are trying to be found and it's been searching for over an hour and a half. I killed the process and ran the dism tool to see what's going on. I get the...
Performance & Maintenance
Command line csc not working.
I am trying to use csc.exe from the command prompt to run a program called c:\code\helloworld.cs. I know the program works as I tested it using 'compile online dot com'. When I run csc, I get the following error (see jpg). How may I solve this problem, please? When I set the 'Path' to the...
General Discussion
DISM Folder being created in AppData\Local\Temp by Disk Cleanup
I've seen this problem reported elsewhere, but I haven't found a solution. I'm reinstalling Windows 7 Professional SP1 from scratch on a Dell Precision M4600 laptop. Yesterday, I went through the entire process of installing the OS, the drivers and running system update. After that was completed, I...
Performance & Maintenance
DISM - Deployment Image Servicing and Management tool
I found this tool while searching the system32 folder: DISM.EXE C:\Users>dism Deployment Image Servicing and Management tool Version: 6.1.7048.0 DISM.exe {WIM_command}
Backup and Restore

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 00:49.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App