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

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: http://blogs.technet.com/b/ems/archive/2015/05/21/installer-stuck-at-18-when-upgrading-from-windows-10-10074-to-10112.aspx and to Scott Hanselman and Stephen Rose for spreading the word.

image
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).

image

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 setupapi.dev.log as well as setupapi.app.log and setupapi.offline.log. Interesting enough there is also a loglevel property… The loglevels can be set by modifying the HKLMSoftwareMicrosoftWindowsCurrentVersionSetupLogLevel value (default is 0x20004001, maximum for devices is 0x0000FF00), more information in this post:

Setting SetupAPI Logging Levels
http://msdn.microsoft.com/en-us/library/windows/hardware/ff550808%28v=vs.85%29.aspx

image
Setupapi.dev.log, 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
http://gregramsey.net/2014/05/14/automating-the-disk-cleanup-utility

Automating Disk Cleanup Tool in Windows
http://support.microsoft.com/en-us/kb/253597/

DeleteDeviceDriverPackages

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

About the author

Johan Arwidmark

5 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

>