Uncategorized


Solved Windows 10 1709 Fall Creators Update failure

Once again updating my Windows PC, which is running Windows 10 and started life as Windows 7, was a major pain as the update to 1709 Fall Creators Update failed at 45% completion with the message “windows could not configure one or more system components”. What took me 7 hours of waiting through a dozen or more downloads of updates and reboots you get to read in a few minutes haha.

My previous solution to solve windows update errors using WSUS offline updater didn’t work this time around. The tool downloaded many updates, but then said no updates required. This was not true as I was running Windows 1607 and the current version is 1709.

A hint of the issue came from viewing the file C:\$Windows.~WS\Sources\Panther\setupact.log

2018-01-13 08:41:50, Info                  CSI    000000de ==Error Summary Start==
2018-01-13 08:41:50, Error                 CSI    000000df (F) Generic Command	ErrorCode: 80004005	Executable: iissetup.exe	ExitCode: 9	Phase: 38	Mode: Install (first install)	Component: Microsoft-Windows-IIS-SharedLibraries-GC, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=amd64, versionScope=NonSxS[gle=0x80004005]
2018-01-13 08:41:50, Info                  CSI    000000e0 ==Error Summary End==

There is something wrong with IIS, which I am not using on this computer. To solve this, on your computer click the search icon and type “windows features” and click the result “Turn windows features on or off”. I initially disabled IIS on my computer, rebooted and tried again. No luck, same issue. Hours later I Tried it again, only this time I came in with a bigger hammer and disabled Microsoft .NET framework 3.5 and 4.7, Internet Explorer 11, and Internet Information Services (IIS). Click “OK”, then reboot your computer. Then run the update again and this time it worked.

Afterward, I went back to windows features and enabled both .NET frameworks and Internet Explorer, but left IIS off. This required another reboot. Also, the upgrade deleted my video card driver, and updating it from the device manager failed. It an nvidia geforce 9500 and I was able to find and download the correct driver from their website for the fix.

All is good, until next time.


Solved: Windows 10 updater stuck checking for updates 1

I upgraded from windows 7 to windows 10 and the automatic windows updates never worked. It always got stuck on this screen saying “checking for updates”.
checking for updates

The fix was doing a couple things. First, download this offline update tool http://download.wsusoffline.net/ and run it as described here https://www.howtogeek.com/247380/how-to-fix-windows-update-when-it-gets-stuck/ . For me, this didn’t even work. It found and applied some updates, but there were a dozen or so that could not get downloaded and installed. However, WSUS offline update did tell me which updates were still missing. Below is the output from the program.

17:00:45.06 - Listing ids of missing updates (please be patient, this will take a while)...
21:59:37.04 - Done.
Listing ids of installed updates...
Listing update files...
Warning: Update kb3127945 (id: 15d7f98f-d025-4ea5-89aa-6fbb09a41e73) not found.
Warning: Update kb3141535 (id: 1ff05279-5627-4993-a62e-4f11ee47ad31) not found.
Warning: Update kb3127890 (id: 0db092b3-c980-4ee6-9b56-54c5790bac86) not found.
Warning: Update kb3191829 (id: dbd12cba-5172-4d0c-8b53-82bcff57f799) not found.
Warning: Update kb3191827 (id: 4c304c75-1b13-4a99-b5b5-c51cef236e66) not found.
Warning: Update kb3191830 (id: bf943a21-4c4c-400b-9fda-dde26cc8867b) not found.
Warning: Update kb4017094 (id: 633a4cc1-35c9-40b9-9714-7cf158168751) not found.
Warning: Update kb3191836 (id: a32e6e50-5224-4987-ae74-24e8698aa25b) not found.
Warning: Update kb2596904 (id: 158250e3-4ef3-47ef-acf3-908145be487a) not found.
Warning: Update kb3191895 (id: 596424f1-aa0d-4d62-bb50-9368bf96df75) not found.
Warning: Update kb3191835 (id: 2366268b-d998-4c53-94cf-f69ab4823a38) not found.
Info: Skipping update kb890830 (Malicious Software Removal Tool) due to matching black list entry.

I then went to Microsoft’s website https://www.microsoft.com/en-us/download/details.aspx?id=55067 and downloaded and installed each of these one by one. Once this was done, the updater worked again and pulled down more updates. Problem Solved.


PHP floats are not created equal

I was given a bug report today and after digging into the problem I found that two floating point numbers that appeared to be equal were not.

Here is a little code and the output. At the bottom is the actual value of each.

var_dump($paymentAmount);
var_dump($amountDue);

if($paymentAmount > $amountDue) {
echo 'is greater';
} else {
echo 'equal or less';
}
printf("%.40f\n", $paymentAmount) . ' ';
printf("%.40f\n", $amountDue)

float(51.01) 
float(51.01) 
is greater
51.0099999999999980104803398717194795608521 
51.0099999999999909050529822707176208496094

PHP acknowledges the issues here under “comparing floats” http://php.net/manual/en/language.types.float.php

The PHP website provides a way to test the number for equality by limiting them to 5 decimals –

To test floating point values for equality, an upper bound on the relative error due to rounding is used. This value is known as the machine epsilon, or unit roundoff, and is the smallest acceptable difference in calculations.

$a and $b are equal to 5 digits of precision.

$a = 1.23456789;
$b = 1.23456780;
$epsilon = 0.00001;

if(abs($a-$b) < $epsilon) {
    echo "true";
}

RetroPie emulationstation not saving game progress 2

I spent part of my Saturday on this issue where I’d make progress in a game and save it within the game, but upon powering down the raspberry pi and returning, the progress would be gone. The problem is if you’re not exiting the game “cleanly”, the the emulation station will not write the game progress to the SD card, even though you’ve saved it in the game. When you configure a controller with RetroPie, it does not present you with a button combination to exit the game, which will initiate a write to the SD card. You can manually add a button combination for your controller by logging into the terminal and going to /opt/retropie/emulators/RetroArch/configs/ , then selecting your controller config, and adding the below two lines:

input_enable_hotkey_btn = 8
input_exit_emulator_btn = 9

Within the config, you’ll see each button on your controller is assigned a number. On my NES controller the “select” button was 8 and the “start” button was 9. With these lines added to the config file, I now press select and start at the same time to exit the game cleanly (which saves progress to the SD card).

Also, you can configure an automatic write to the SD card at an interval. Edit your retroarch.cfg file and uncomment the line “autosave_interval” and set it’s value to an integer representing a number of seconds. For example

autosave_interval = 5

Will save your progress to the SD card every 5 seconds.