You are here:   Research
  |  Login

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

Minimize
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: 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 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
https://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
https://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.








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

Minimize