You are here:   Research
  |  Login

Welcome to my blog, quickest way to find articles is usually to search for them.

Search in All Title Contents

Inside the hack that fixes most of the Windows 10 build 10122 upgrade issues

May 22 2015

By now it’s starting to become public knowledge that most of the the Windows 10 build 10122 upgrades that failed at the 18/62 percent mark can be fixed by opening a command prompt as system (via psexec -i –s cmd.exe), and run the following command (note: case sensitive):

rundll32.exe pnpclean.dll,RunDLL_PnpClean /DRIVERS /MAXCLEAN

Cred: Big thanks to Pieter Wigleven who first posted the fix here: and to Scott Hanselman and Stephen Rose for spreading the word.

Running the fix is a command prompt elevated to system.

So, what does the hack really do

The documentation around pnpclean.dll (Plug and Play Maintenance Task Library) is spare to say the least, but it is the same component being used by the native Disk Cleanup utility in Windows. So why doesn’t the native Disk Cleanup utility do the job when selecting to delete device driver packages then?  Well, when looking into the pnpclean.dll, you can see the following info in process explorer (same as running the strings utility against the pnpclean.dll).


If you scroll further down in the strings windows you can see that the following strings:

Searching for unused drivers that may be removed from the system.
Will only keep drivers that are installed on some device.

Log files

From the information you can also see pnpclean.dll is logging to as well as and setupapi.offline.log. Interesting enough there is also a loglevel property… The loglevels can be set by modifying the HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\LogLevel value (default is 0x20004001, maximum for devices is 0x0000FF00), more information in this post:

Setting SetupAPI Logging Levels

image, with default logging level, showing the commands being run.

So again, why is it behaving different when launched via Disk Cleanup vs. launched manually?

So far (still investigating) it looks like the disk cleanup process, does not call the /MAXCLEAN option.

Tip: You can also automate the tasks that the Disk Cleanup utility does, see the following posts

Automating the Disk Cleanup Utility, by Greg Ramsey

Automating Disk Cleanup Tool in Windows


The error in Setupact.log without running the fix prior to upgrade.

Deployment News

Happy deployment, and thanks for reading!

What our lawyers makes us say:

This information is provided "AS IS" with no warranties, confers no rights and is not supported by the authors or Deployment Artist.

Copyright © 2017 by Deployment Artist (the company behind deployment research). All rights reserved. No part of the information on this web site may be reproduced or posted in any form or by any means without the prior written permission of the publisher.

Shorthand: Don't pass off our work as yours, it's not nice.

Blog Archive


Where you can meet us!

Live Stream Recordings
ConfigMgr 1806 and W10 OSD

5 Days - Mega Geek Week 
(multiple classes, ConfigMgr, OSD etc.)
- Johan Arwidmark, Mikael Nystrom...
Jun 10, 2019, Chicago, IL, US

4 Days - Windows 10 OSD Classes
- Johan Arwidmark
May 20, 2019, San Diego, CA, US
Jun 17, 2019, Culemborg, NL
Jul 8, 2019, Phoenix, AZ, US

5 days - ConfigMgr Classes
- Johan Arwidmark and Kent Agerlund
Apr 8, 2019, Chicago, IL, US
Apr 22, 2019, Houston, TX, US

Video-based trainings

MDT, Windows 10 and ConfigMgr Books

Contact Info