Kartones Blog

Be the change you wanna see in this world

Fixing Windows Update service registration missing or corrupt

The other day I wanted to give some use to my old development laptop to watch movies at the living room (instead of using the gaming PC, now at another room). I opted for a fresh format and installing Windows 7, to either get the upgrade to Windows 10 or staying with a decent OS (I got really tired of Windows 8/8.1). But few things in life are easy, so after installing the OS, some drivers and running Windows Update once, it installed Windows 7 Service Pack 1... and after a reboot, the "check for updates" would never end (I left it ~4 hours the first time).

As usual, I searched for possible problems. Basic official Microsoft troubleshooting just pointed me to a tool, so I tried that Microsoft FixIt utility. It did nothing.

I kept refining searches until I found something more specific: Windows Update components might get stuck, corrupted, call-it-whatever-you-want. So I tried that Windows Update Diagnostic utility. First run said it fixed a few things except two of them.

Searching for one of the remaining issues I was told to download the System Update Readines Tool for Windows 7, a 550MB (!) pack of something that looked individual patches. No problem, download, run, wait, restart and running the WU diagnostic utility I got to just one reamining unfixed issue: "Service registration is missing or corrupt".

Now, hunting for how to fix the service registration I wasted probably more time than with everything else, as there is no official answer, lots of KB and Microsoft forums questions without official answers, and lots of procedures that seems to work sometimes. This is what I did to fix the issue:

  1. Run multiple times the diagnostic utility (not joking). Eventually it will fix the error.
  2. On an Administrator-elevated Command-Prompt, type:
  3. net stop wuauserv
    wuauclt /detectnow

  4. Leave the PC on and connected to internet for 1-2 hours until Windows Update catches up. It might look as if doing nothing, but if you check the task manager, I had one core at 100% use, and svchost.exe was eating +1GB running among others the "wuauserv" executable. It will gather all your installed updates, all available ones and start downloading them (at least a first pack of mandatory ones).

When it finishes, checking for updates again will yield almost 200 new Updates between mandatory and optional. You probably will need to restart multiple times as some of them are exclusive regarding sequential install, but with patiente you will be able to leave the PC fully up to date.

I know and understand operating system updates are not easy to deliver, but maybe instead of trying to sneak me Bing or Silverlight "updates", the effort could be put into improving the diagnostic tools (so they work properly and the first time) or at least in the KB providing an easily reachable official solution.

Now, I should decide if to try to force the Windows 10 upgrade or not, as I've had enough unexpected installs and updates for a while...

Setting up a Ubuntu VirtualBox Virtual Machine

I've been using for more than one year and a half an Ubuntu 12 VM for daily development. I know we now live in an era of Vagrants and containers, but I haven't had good experiences with the former, and having Windows host OS containers with Linux guests are not possible. Also, with a proper configuration & decent CPU, assigning one or two cores and a few GB of RAM to a VM makes for a wonderful development environment (which you can backup, rollback and duplicate easily).

So, I decided that might be interesting to write down my findings and some quick optimizations anybody can apply to get a faster guest Linux VM.

I have tested this VMs both with Windows hosts (Windows 8, 8.1 and 10) and Ubuntu 15, with a 4th gen i7 and a 5th gen i5 (both mobile CPUs), 8 GB of host RAM and SSD HDDs.

Basic configuration

  • Always use the latest VirtualBox version: For example 5.0 has speed improvements and USB 3.0 support, but in general it is nice to keep updating them as Linux kernels get new releases quickly and I wouldn't trust an old "Virtualbox Guest Additions" build.
  • Assign 1 or 2 CPUs to the VM: My rule is up to half the physical ones, but if you are going to "mono-task" a lot, maybe one is enough. For background processes, jobs and similar tasks 2 assigned processors work better.
  • There's no need to change the chipset setting. I found some posts telling people to change from PIIX3 to ICH9. Most are about old generations of CPUs and I noticed no increase in performance changing it so went back to the "safe and proven" setting.
  • 2 to 3 GB of RAM are usually more than enough: I run 2 Node.js apps, PostgreSQL, Ruby on Rails, Resque jobs, Sublime text, PGAdmin... all of them usually under 2GB of used RAM. Just keep an eye for swap usage, swapping is the devil.
  • Enable all the System tab options that you can: Nested paging, PAE/NX... all of them are good, and you can even try setting them on and if something breaks just turn them off again. Shared /bi-directional clipboard is great but I don't know why comes off by default.
  • Linux Acceleration is still crappy with VirtualBox: Forget about 3D acceleration, and if you prefer speed to fancy animations, disable also 2D acceleration and see more tweaks below. You will get pixelated zoom effects when switching applications but the OS performs faster overall. This also allows to setup 18 or 24MB of RAM without problems.
  • Check the "Solid-State Drive" option in the Storage section when the Host HDD is an SSD: This also should be an automatic check but... anyway do it because not only I/O will be faster you'll also increase the lifespan of your SSD drive.
  • Port forwarding is dead easy between VMs: I had to comunicate two VMs recently, and found that each VM can communicate with the outside just calling the default route ( by default) and a given port, and then forwarding that port to another VM's IP (e.g. calls which gets forwarded to
  • Shared folders are so great: Windows with Samba can read and write Linux folders, so don't be afraid to use them.

Ubuntu tweaks

  • Toolset for many of this tweaks: CompizConfig Settings Manager, Ubuntu Tweak, MyUnity. Depending on the Ubuntu version some might not be available.
  • Disabling fancy effects, fadings and animations, and for those animations you cannot remove, just set them as fast as possible. You can even fully disable VSync waits to squeeze some FPS if your hardware is not great.
  • If you have a good resolution setup, disabling font antialiasing also speeds up. And at the bare minimum you can disable it from the window titles.
  • Disabling background (just place a plain solid color) and sounds. I directly disable sound at the VM.
  • Missing a right click context menu "open in Terminal" option? Try this:

    sudo apt-get install nautilus-open-terminal
    nautilus -q

  • Remove all unwanted software: Upon install, Ubuntu each day feels more like Windows, full of OpenOffice applications, viewers, crappy games and other stuff you probably will never use. Do yourself a favor and spend 20 minutes checking all installed packages and removing the unused ones.
  • Ubuntu Tweak has a nice feature call "Janitor". It allows you to clean unused packages and dependencies and, most importantly, remove old kernel versions and old cached packages. Each time I use it I regain around 1GB of space and delete hundreds of files.
  • Linux filesystem uses a "journal" to write changes in a way there is no data loss. You can change it to be faster at the expense of less reilability in case of errors (I haven't had any issue yet):
    sudo tune2fs -O has_journal -o journal_data_writeback /dev/sda1
  • Another option I haven't yet explored is creating a RAMDisk, should be noticeably faster and as now we're going towards 16GB can be interesting if your VM does a lot of I/O.


  • Disable Super key/Win key: Quite annoying and a problem if both the Host and Guest OS are Linux as one steals the keypress from the other. Afterwards I for example have it mapped to switching the keyboard layout.
  • To remove undesired autoboot applications, you can check the boot list at /etc/xdg/autostart
  • Sometimes (for example disabling Bluetooth) the Unity control panel just "stops working". Ubuntu dependencies seem to uninstall it, but bringing it back is easy: sudo apt-get install unity-control-center
  • If with a Windows Host the Guest Linux runs extremely slow, this SuperUser.com instructions might help. In my specific case I was missing the proper Host Intel chipset drivers and VirtualBox was really slow.

Bonus: Security

  • Encrypting the Home folder: After install, as at setup time you can do it. Careful as it will eat twice the HDD space (it decryps the home folder upon login, creating a copy) and hurts I/O.
  • Or activating a /Private home encrypted subfolder: My favourite, way less taxing on I/O but with some symbolic links you can have a safe but comfortable folder structure.
  • And how to disable encryption, just in case you change your mind or wish to change from /Home folder to /Private subfolder one

Code and style checks for Ruby at Sublime Text

I use lately Sublime Text a lot, both at work and at home, where it's curious that even for languages that I have better tools available and installed (C#/ASP.NET, Powershell...) I usually use Sublime too instead (because is faster and I don't need to compile nor debug). Also, at work my colleages have activated Hound to get GitHub comment floodings coding style violations and, as you get one comment per broken rule, some pull requests become really hard to code review.

So, in order to prevent hound bites (and learn in a more confortable way what rules I should follow), I checked and fought a bit with Sublime plugins to setup the same rules that Hound uses for Ruby code (Rubocop gem) and have them inside my IDE. If you want to have realtime coding style checks inside Sublime 3, you need this:

Just take into account to leave the Rubocop rules file named as .rubocop.yml at the project's base folder, because SublimeLinter-Rubocop doesn't allows to specify another name/path. Also restart the IDE after installing everything.

It is fun that at 2005 we had nice aggregated CI reports that you could also concatenate and send via a single email (or check online at your CI server) but at 2015 receiving literally 50 emails after creating a pull request seems good by a continuous integration tool maker... ¯_(ツ)_/¯

12 game engines recreations for classic PC games I like

Syndicate Wars Port screenshot

Note: All of this engines require the original game data files as they are work based on reverse engineering of the game binaries but all content must be installed by you. You can find most games quite cheap at either Steam or Good Old Games.

I love videogames, but lately I'm noticing that out of the dozens of monthly releases, as much as one title per month is appealing to me. While this is good for my lack of time, it also means that with some exceptions, I'd sometimes rather play an old videogame instead of the latest triple-A. But, as Windows evolves compatibility breaks, and regarding old videogames many times the only available trick is to fallback to DosBox. You setup everything, launch it... and notice that playing Dungeon Keeper at 320x240 was acceptable back then but now feels way too low for a strategy game.

Ohh, nostalgia, always tricking our mind into feeling that old games were superb and awesome, but also forgetting that UIs were more ankward, resolution was pretty low, and games had also bugs (although not so many as today constantly-patching madness) and severe limitations. Thankfully, there is an answer for this wish of "playing old videogames fixing old times annoyances": Fan-made game engine recreations. Crazy developers that rebuild the game internals either as a multiplatform game (Windows/Linux/Mac) or at least compatible with the latest Windows versions (still a great achievement considering that many were made for MS-DOS), but usually also offering higher resolutions, working online multiplayer, tons of bugfixes and usually also some tweaks or improvements over the original.

Here is a small alphabetical list of 12 classic games that I love playing with custom engines because they recreate quite well the experience or when they enhance it, it really is for good.

  • Diablo 1 HD Mod: Diablo had lots of unfinished quests and even some art. The Green Portal (unofficial) and Hellfire (official) expansions added content, but this mod not only joins those but also fixes all known bugs and half-baked quests. It also has a crafting system, adaptative difficulty level, 3D acceleration and visual effects like colored lights, so it "transforms" the original but takes it almost at the level of Diablo 2
  • Dune Legacy: Dune 2 was the game that made me "want to do similar things with computers", to decide to study computer science. Dune Legacy allows not only the full campaign with higher resolution and better UI controls, but also multiplayer and skirmish games
  • FreeCiv: Civilization was one of the first PC games I enjoyed on my 386, so many afternoons spent deciding tactics to conquer the world. This version not only has multiplayer but also supports modding via custom rulesets. Deviates a bit from the original as contains elements from Civ 2
  • FreeSynd: This is the only game of the list that I wasn't unsure to add, because the engine remake is still quite beta and buggy. I ended up playing the GoG version but maybe the situation has improved
  • KeeperFX: Engine for Dungeon Keeper, adding 3D acceleration, higher resolutions, custom maps and working online. Also doesn't modifies any mechanics
  • OpenRA: Command & Conquer, Red Alert and Dune 2000 game engines. If you have the original CDs can install the data and play the campaigns, else you have a free multiplayer or (highly difficult) CPU opponents. Probably one of the best of the list
  • OpenTTD (Open Transport Tycoon Deluxe): Transport Tycoon was one of the best simulators I've ever played (alongside Sim City). Fixes some bugs and has working multiplayer
  • OpenXcom: UFO: Enemy Unknown (XCOM: UFO Defense in the USA) redefined the turn-based strategy games. The original had some nasty bugs and seems to be some customization support (but I just play the original campaign/mode)
  • ScummVM: I couldn't pass without mentioning THE game engine remake, because it allows to run most Lucasarts titles (which include lovely classics like Monkey Island or Maniac Mansion) but also because it is so multi-platform that can be run almost from everywhere you can think about. I used to play it even in a Windows Mobile PDA :_)
  • Syndicate Wars Port: Syndicate Wars was an ambitious follow up, and the software-based 3D engine was really cool back in the day. This engine, while has the multiplayer part broken, allows to play with any recent OS
  • Tenebrae: Quake engine to provide great 3D features but leaving the base game untouched. For a true enhanced experience, try Nehahra Project, which adds crazy stuff like bump mapping and provides also tons of new maps, enemies and even a 4 hours "movie"
  • Zandronum: Multiplayer ZDoom mod for Doom, which means "tons of tweaks and optimizations". Itself allows to play Doom in high-resolution, but if you combine it with Brutal Doom mod you get one of the most insanely fun shooters I've ever played

I probably have missed some others, but I think with all excepting FreeSynd I have finished the full campaign/history at least once so they indeed work.

Stopping Windows 10 privacy bleeding

There's been quite some talk about how Windows 10 upon install by default sends lots of mostly private stuff to Microsoft. Sure, it can turned on "just not using express settings", but we all now many people are lazy and install without reading, so this was done on purpose (else everything would be opt-in).

After the initial install, people realized the operating system kept bleeding data to the outside, so I did a quick test. I opened Task Manager, the Performance tab and there it was having a high activity peak when I wasn't doing anything. To avoid a false positive I ordered processes by network %... and I had the Search "app" sending 2.3MB of data... when I had disabled everything I could at setup (plus later on the Privacy settings).

Checking the App History tab I got this nice two "rogue leakers", two applications I hadn't even launched once in my few weeks using the new OS:

Examples of personal Windows 10 data leaks

Somebody please tell me why the Store has to grab so much data when I haven't even setup a Microsoft account (I use a local one), or why if I have never searched anything it was sending/receiving MBs. Searching for a more complete list of Windows 10 privacy fixes I found this nice guide, but as I never use Bing and similar MS-only services, I did some network sniffing to see what other places my PC is still "calling".

This are the domains I've ended up blocking (redirecting to from the hosts file is the best stopper) based on articles read and my own Wiresharking experience:

  • any.edge.bing.com
  • bing.com
  • msn.com
  • live.com

I also disabled ssw.live.com but then I had issues updating Windows Defender so I guess it either controls WD definition files or the whole Windows Update and I unblocked it.

I really like Windows 10 after suffering Windows 8 and using Windows 8.1 (although I'm sticking to Windows 7 for the gaming PC), but sadly it seems the privacy invasion era has jumped from mobile phone operating systems to desktop ones. It's still a better battleground to fight from (Firewalls, hosts file, 3rd party apps/tweaks...) but still another war to fight at.

PS: I've read as much as possible to take away FUD from reality, and while some options have been explained, not all questions have been answered.

PS 2: If I come with additional things to disable or domains to block I'll update the post to reflect it.

Previous entries