Batch Uninstall Windows Updates

This post shows how to programmatically automatize the batch uninstall of multiple Windows Update hotfixes. The code samples are in AutoHotKey syntax, and you can get the full source code, as well as compiled executables ready to run, on the Windows Updates Uninstaller Utility online repository.

Listing the Updates

The simplest way to get a list of the installed Windows Updates is through WMIC, which is an internal Windows command-line interface for accessing management functions. Using the QFE module, we can generate a list by running the following command, for example from the Command Console: wmic qfe get "HotFixID" /format:table

This will list the installed updates directly in the console, like this: updates list on console

It’s easier to parse them from a text file, and luckily our friend QFE can do that for us too with the following command:

wmic qfe list brief /format:texttablewsys >"%Path_of_the_text_file%" where %Path_of_the_text_file% is what it says, the path of the text file to be created, such as C:\hotfix.txt for example, or wherever. When listing in a file, it won’t list individual columns but the whole table, so you’ll need to use character offsets when parsing columns.

Uninstalling the Updates

To uninstall each update, the easiest way is to use WUSA, which is a built in Windows utility for managing Windows Updates. Since you already have a list of the installed updates, you just need to extract the hotfix ID number from each row, and run the following command for each update:

wusa.exe /kb:%HotfixId% /uninstall /quiet /norestart where %HotfixId% is the hotfix ID number. For example, to uninstall update KB279503 you need to run the following:

wusa.exe /kb:279503 /uninstall /quiet /norestart and so on. Since uninstalling each update takes time, you should wait for one uninstall to end before beginning the next one. If you’re using AutoHotKey, you can simply use the RunWait command and it will wait for each execution to finish before starting the next one.

Putting it all together

The essence is simple: get the list of updates, parse it to retrieve the hotfix IDs, and uninstall them one by one. If you’re into AutoHotKey, it’s pretty easy to do, as you can see at the Windows Updates Uninstaller Utility online repository. There you’ll find an AutoHotKey implementation with a basic GUI, in both source-code and compiled executable form, so you can toy with the code or use as-is.

What is Google Authenticator, and how it can protect your personal and business accounts

In this day and age when concepts like hacking, phishing, and identity theft have become commonplace because of their prevalence, it’s no wonder companies in the tech sector are heavily investing in security technologies in order to keep themselves, and their clients, one step ahead of the game. Google, being one of the biggest web companies, with hundreds of millions of user accounts, is one of them, and has developed a really ingenious authentication system that can be used not just to protect their own user accounts, but also many existing third-party platforms.


The use of passwords, or passphrases, to make sure a user is really who he says he is, has been the cornerstone of user authentication since the advent of computing. The premise is simple: since the password is secret, only the real user should know it, right? However, the weakness of such a system is that an unchanging password can be guessed, either “by hand”, or programatically through what is called a brute force attack. It can also be stolen by intercepting a user’s communications, such as his requests to log into his account. The solution? An “ever-changing” password.

OTP – One Time Password

Being realistic, changing your password each time you use it to login wouldn’t be practical. Not only would you waste a lot of time each time we go into our account, but tracking what the password is at any given time would be a logistical nightmare. But, what if your user account did all of this for us automatically? That is the premise of OTP algorithms: each time you login, you use a different password, automatically generated by an application on your computer or smartphone. It is precisely this technology that Google has implemented to secure even further their user accounts; they call it two-factor authentication. To show the system you really are who you say you are, you supply two proofs of identity: something only you know (your “static” password, as you have always done until now), and something only you own (your computer or smartphone which generates the one-time code, i.e. your “ever-changing” password). In this case the One Time Password doesn’t substitute your static password, but actually adds another layer of security on top of it. That way, even if either your static password or your authenticating device (your PC or smartphone) gets stolen, the perpetrator cannot log into your account without the other one.

Securing your Accounts

Google Authenticator is based on open standards, and there are not only existing implementations for popular web systems and frameworks, but also open source libraries for integrating this technology into any user system imaginable. There are Google Authenticator solutions available for WordPress, Joomla, Prestashop, Magento, as well as the native implementation for Google and GApps accounts. As for authenticating devices, there are free apps for Android, iPhone, and Blackberry devices, Windows, Mac OS, and Linux PCs, and there are even specialized standalone gadgets you can purchase. If you are reading this, chances are you already own a device you can use for authentication; if that’s the case, don’t you have an account worth protecting?

Disclosure: I’m the developer of the Prestashop and module mentioned above, so you might say I have some vested interest in the success of the Google Authenticator technology; however the reason I developed this solution in the first place is because I think the technology really provides value by dramatically increasing the security of user accounts in a relatively simple yet elegant way. Isn’t that what development is all about?

Write most latin script based languages with special characters quickly and easily on a US layout keyboard in Windows

Update: Since I wrote this post, better systems made by other people have been developed. Since I don’t plan to continue development of Intuitive Keyboard Expander, I would suggest instead to check out WinCompose, which is the best such system I’ve found, and the one I currently use.

Do you have a US Standard layout keyboard, but need to write in another language which uses special letters or diacritics? Possibly even various languages with their own different latin script based characters? If you want the quickest, most versatile and intuitive way right away, you can skip the rest of this post and download Intuitive Keyboard Expander. If you want to know how it works, as well as other more limited ways to write such characters, then keep on reading.

Keyboard Language Settings

On Windows systems, perhaps the most used way to type another language’s special letters and characters is to change the keyboard language (layout) configuration. In the Regional and Language Options in the Control Panel, you can add other languages’ layouts, and change between them by either pressing the Alt+Shift key combination, or manually on the Languages toolbar, which normally appears on the Taskbar when you have more than one language installed. The shortcomings are that you need to activate the corresponding layout each time you want to change the language you’re using, and that you must know by heart which keys do what on each layout (for example, the ; key on a US Standard keyboard will write ñ instead on a Latin American layout, and most of the symbols are in different keys).

Character Map

Another, more cumbersome way, is to copy the needed characters from the Character Map (in Accesories->System Tools from the Start Menu). This way you can get practically any character you want, at the cost of having to look for it, copy it, and paste it on your document each time you need to use it. For typing lots of text, or just in a language with a lot of diacritics and special letters, this is obviously not practical because of the sheer amount of time you need to get each one of these characters.

RichEdit-Enabled Programs

In some programs which use the RichEdit control, such as Wordpad, you can enter many special characters by writing their Unicode Hexadecimal Code, followed by the Alt+X key combination. The disadvantages are that it doesn’t work in most programs, you have to actually know the Hexadecimal Code of every character you’re going to use, and that you can’t write numbers or the letters af immediately preceding the special character, because they’re going to be treated as part of the Code.

Alt Codes

A more technical, yet savvy way, is to use what is commonly known as the “Alt Codes”. There are actually two types of “Alt Codes”, the Decimal and the Hexadecimal. The Decimal codes work by default on most Windows installations, but the problem is they’re not Universal because they depend on your computer’s Code Page (basically the list of allowed characters on each specific language version of the Operating System, which has actually become obsolete thanks to the advent of Unicode, but for legacy reasons it’s still embedded in Windows up to this day). This means that two computers configured in different languages will write different characters for each Code. To use them you need to hold the Alt key while typing the Decimal Code of the character on the Numeric Keypad. Of course you need to know the Decimal Code for each character.

The Hexadecimal “Alt Codes” work in a very similar way to the Decimal ones, but with a few changes. First of all, they’re Universal, which means a given Code will type the same Unicode character on any computer, regardless of language settings. Also you have a way larger set of possible characters you can input, because it supports any Unicode character. The disadvantages would be that it’s not enabled by default in many versions of Windows, so you would need to add a key to the Registry for it to work (EnableHexNumpad as a REG_SZ type with a value of 1, in HKCU\Control Panel\Input Method\), and that as with the Decimal variant, you would need to know the Hexadecimal Code for each character. To use them, you need to hold the Alt key while typing first the + Key on the Numeric Keypad, and then the Hexadecimal Code anywhere on the keyboard.

Intuitive Keyboard Expander

So… is there a better way to type special characters from other languages? Yes, and it’s called Intuitive Keyboard Expander. What this free program does is transform some of your normal keys into special modifiers, much like Ctrl or Alt, but without losing the key’s functionality. For example, if you hold the (apostrophe) key while typing a letter, you will get that letter with an acute accent, as in áóúśź, but if you just release it without pressing other letters, you will get its intended function, in this case (apostrophe). All the modifiers are very intuitive and easy to remember (for example` for Grave Accents, , (comma) for Cedillas and Ogoneks, / for diagonal strikes as in øł¢, : for diaeresis and umlauts, etc.), and all in all they allow you to write more than 70 different latin script based languages.

This program works by using the Windows API to send Unicode characters as virtual keys. There are only two minor disadvantages, which are that you’ll need to hold the right arrow key to use the autorepeat functionality of the keys assigned as special modifiers, and that some key combinations may not work on cheaper keyboards because of key ghosting. The best of all is that it’s Open Source, which means you can check and even compile the code yourself, if you aren’t too trusting. Anyway if this sounds like a program that could be useful to you, check the full documentation and download it from the official website.