This is a PS to my own post. Below is a batch file I created using the bits and pieces of ideas I found on the internet. While this is for
Windows Update problems, for some reason it fixed the Loop problem on my test machine.
Those of you that use this batch file remember the old and sometimes worn out phrase "Use this fix at your own risk." While it worked for me, it may not work for you and may cause problems with the Windows OS. that being said:
Again, use this at your own risk. It may help if you copy and paste each section one at a time. If you do not understand any of the above or have no idea what I am talking about, DO NOT TRY! You are not educated
enough to recover your desktop should a mistake happen."
The Batch File starts here:
ECHO off
REM Some cleanup if this has been run before
IF EXIST %systemdrive%\SUSClientReset.old del %systemdrive%\SUSClientReset.old
IF EXIST %systemdrive%\SUSClientReset.log ren %systemdrive%\SUSClientReset.log %systemdrive%\SUSClientReset.old
Set errorlevel=0
CLS
REM If you copied this off the Internet or given to you by a friend,
REM you will use this with no warranty and at your own risk. However, this works well for me and many others
REM This program will clear the Windows Update files and folders from the %windrive%\SoftwareDistribution
REM directory. Then it will clean the registry of the Windows Update settings and re-apply them.
REM Once this is done, it will call for the WSUS server to rebuild the Windows Update folder structure.
ECHO USE AT YOUR OWN RISK, or you can copy and paste each command
ECHO one at a time if you are doubtful.
REM Coder: Tim Quinn Sr. 7-28-2014 - Updated 11-3-2015
ECHO This program will clear the Windows Update Files and Folders.
ECHO It will reset the Registry entries and re-start the Windows
ECHO Update Service by calling the WSUS server for Updates. Once you start
ECHO this routine, DO NOT CANCEL or damage to the Windows OS
ECHO installation may occur. There are a couple spots you can use
Echo for 'Emergency" exits.
Echo Be sure that the BITS service is running and set to Automatically Start (Delayed).
ECHO If you need to check BITS or do not want this program to run, or have no idea what I
ECHO been talking about, press Ctrl-C NOW to exit.
ECHO Otherwise,
Pause "Continue on Watson..."
REM This part checks to make sure the SoftwareDistribution folder exists.
REM Sort of a security check to make sure this batch does what it is
REM supposed to do. If it does not exist, the program simply exits.
IF EXIST %systemroot%\SoftwareDistribution\ReportingEvents.log GOTO Continue
Echo The Folder SoftwareDistribution does not exist or is empty. Run wuauclt.exe at a CMD
Echo Window to see if that rebuilds the folder structure. If it does not, this batch file
Echo
will not help. You have a more serious problem. Exiting...
ping -n 45 127.0.0.1 >NUL
exit
:Continue
REM This part deletes the contents of the "%windrive%\SoftwareDistribution"
REM folder and removes it
net stop wuauserv
net stop bits
ECHO This is a 15 second pause for older systems to catch up with processing
ping -n 15 127.0.0.1 >NUL
rd %systemroot%\softwaredistribution /S /Q
REM Done with this part
REM READ NEXT PART CAREFULLY
REM THIS NEXT DOS CODE GROUP WILL NOT WORK FOR WINDOWS 7 AND LATER.
REM This will reset the Cryptic Services and rename the Spupdsvc executable in
REM case there is a problem with that file.
REM If you are working with an XP or older Machine
REM then remove all of the below "REM" statements.
REM net stop CryptSvc
REM If Exists %windir%\system32\catroot2.old del %windir%\system32\catroot2.old
REM ren %systemroot%\system32\catroot2 catroot2.old
REM net start CryptSvc
REM Echo Still working .......
REM timeout /t 10 /nobreak
REM This part renames the Spupdsvc.exe to Spupdsvc.old to make sure there isn't a problem with the file itself.
REM Again, if this is for an XP machine, remove REM statements in this section
REM IF EXIST %systemroot%\Spupdsvc.old del %systemroot%\Spupdsvc.old
REM IF ERROR LEVEL>0 GOTO :CONT
REM cmd /c ren %SystemRoot%\System32\Spupdsvc.exe %SystemRoot%\System32\Spupdsvc.old
REM Echo End of Resetting Cryptic Services
Set ErrorLevel=0
REM Windows XP only
REM reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f > %systemdrive%\SUSClientReset.log 2>&1
REM Windows XP only
REM reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f >> %systemdrive%\SUSClientReset.log 2>&1
REM reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f >> %systemdrive%\SUSClientReset.log 2>&1
REM Windows XP only
REM reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIDValidation /f >> %systemdrive%\SUSClientReset.log 2>&1
REM Windows 7 key/s
net stop CryptSvc
If Exists %windir%\system32\catroot2.old del %windir%\system32\catroot2.old
ren %systemroot%\system32\catroot2 catroot2.old
net start CryptSvc
Echo Still working .......
timeout /t 10 /nobreak
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v LastTaskOperationHandle /f >> %systemdrive%\SUSClientReset.log>&1
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v ResetClient /f >> %systemdrive%\SUSClientReset.log>&1
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientID /f >> %systemdrive%\SUSClientReset.log>&1
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIdValidation /f >> %systemdrive%\SUSClientReset.log>&1
REM This part renames the Windows Update log file
IF EXIST %systemroot%\windowsupdatelog.old del %systemroot%\windowsupdatelog.old
ren %systemroot%\WindowsUpdate.log %systemroot%\WindowsUpdatelog.old
REM This part restarts windows update services
net start wuauserv
net start bits
wuauclt.exe /resetauthorization /detectnow
wuauclt.exe /reportnow /detectnow
wuauclt.exe /detectnow
goto comp
:comp
REM this part runs the Windows Update and rebuilds all folders
wuauclt.exe /resetauthorization /detectnow
wuauclt.exe /reportnow /detectnow
REM this part says GOODBYE!
Echo All Done! 10 second pause for bows and applause
ping -n 10 127.0.0.1 >NUL
Exit
If this DOES work for you, please post your "ALLLL Riiiiight!" so others can see that it works