Tuesday, January 3, 2017

Windows 8.1 Windows update hangs forever and never updates.

I have ran into this problem on just about every computer i run windows 8.1 on. Here are all the methods I've found for fixing the issue:

1. Run this script in safemode:

"net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc

pause

Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak

pause

sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)

pause

regsvr32.exe atl.dll
regsvr32.exe urlmon.dll
regsvr32.exe mshtml.dll
regsvr32.exe shdocvw.dll
regsvr32.exe browseui.dll
regsvr32.exe jscript.dll
regsvr32.exe vbscript.dll
regsvr32.exe scrrun.dll
regsvr32.exe msxml.dll
regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll
regsvr32.exe actxprxy.dll
regsvr32.exe softpub.dll
regsvr32.exe wintrust.dll
regsvr32.exe dssenh.dll
regsvr32.exe rsaenh.dll
regsvr32.exe gpkcsp.dll
regsvr32.exe sccbase.dll
regsvr32.exe slbcsp.dll
regsvr32.exe cryptdlg.dll
regsvr32.exe oleaut32.dll
regsvr32.exe ole32.dll
regsvr32.exe shell32.dll
regsvr32.exe initpki.dll
regsvr32.exe wuapi.dll
regsvr32.exe wuaueng.dll
regsvr32.exe wuaueng1.dll
regsvr32.exe wucltui.dll
regsvr32.exe wups.dll
regsvr32.exe wups2.dll
regsvr32.exe wuweb.dll
regsvr32.exe qmgr.dll
regsvr32.exe qmgrprxy.dll
regsvr32.exe wucltux.dll
regsvr32.exe muweb.dll
regsvr32.exe wuwebv.dll

pause

netsh winsock reset

pause

netsh winhttp reset proxy

pause

net start bits
net start wuauserv
net start appidsvc
net start cryptsvc

pause

sfc /scannow

pause"

2.  You could install these 2 updates (they install an newer version of the windows update client):

https://www.microsoft.com/en-us/download/details.aspx?id=53334

https://support.microsoft.com/en-us/kb/3138615

3. Or you can try your luck with the troubleshooter utility built into windows 8.1:

Press the windows key and type "Troubleshooting" and press enter

Then click "Fix problems with Windows Update"

Click "Advanced" and then "Run as administrator"

and follow the prompt

How to Activate Windows 8.1 with Windows 10 OEM key

KB3044374 is the windows update that allows windows 8.1 to activate with a windows 10 OEM key. (I verified this on 2 computers)
  1. A way to cleanly install and activate windows 8.1 on these computers.
Go to https://www.catalog.update.microsoft.com/Home.aspx and download KB3044374
Once downloaded install the update and windows should activate automatically
  1. To automate to process using windows deployment tools
Once you have done that take a windows 8.1 installation media and extract the "install.wim" and "boot.wim" files from it and save them somewhere
Then take KB3044374 you downloaded and inject it into install.wim file using these commands:
dism /mount-wim /wimfile:C:\Path_To_wim\install.wim /mountdir:C:\Mount_Point /index:1

dism /image:"C:\Mount_point" /Add-Package /PackagePath:"C:\Path_to_updates"

dism /unmount-wim /mountdir:C:\Mount_point /commit
These commands will mount the wim file, inject KB3044374, and dismount the wim file
Use the updated wim file to install windows 8.1 and it wiil accept the windows 10 OEM key automatically
One final note if you are trying to inject KB3044374 from windows 7 you will need to use the copy of dism included on the windows 8.1 installation media under sources because the version of dism on windows 7 is incorrect


If the above doesn't work simply run windows update after the installation and install all of the updates. Once that is done download this tool:
 https://github.com/Superfly-Inc/ShowKeyPlus/releases

and use the OEM Key to activate your copy of windows. You may need to enter a product key in order to complete the installation, if you are asked for a product key you can enter one of the ones listed here as a place holder until you are able to install the windows updates and enter the correct one:
 https://technet.microsoft.com/en-us/library/jj612867.aspx

If you are using WDS to install Windows 8.1 then you can enter the generic product key into the answer file under amd64_Microsoft-Windows-Setup_neutral > UserData > ProductKey

 
If you want to try to automate the activation you can do it with this bat file: @echo off setlocal enableextensions for /f "tokens=*" %%a in ( 'get_win8key.exe' ) do ( set myvar=%%a ) slmgr.vbs //B -ipk %myvar% slmgr //B -ato

You can get the get_win8key.exe tool from here:

https://github.com/christian-korneck/get_win8key