Microsoft stopped supporting Windows XP in April, but a simple registry hack lets users continue to get security updates.

The hack, as reported by ZDNet, fools Microsoft into thinking the system is running Windows Embedded POSReady 2009, a variant of XP that's used by ATMs and cash registers. Those systems will keep getting security updates until 2019.

All XP users need to do is create a text file with the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\WPA\PosReady]

"Installed"=dword:00000001

Then, change the file extension from “.txt” to “.reg,” and run the file in Windows Explorer. Opening Windows Update at this point should reveal several new security updates.

On the downside, the hack only works on 32-bit systems. There's a workaround for 64-bit machines, but it involves manually downloading update files from Microsoft's website and tweaking them so that Microsoft doesn't block the installation. (Windows XP 64-bit is based on Windows Server 2003, which Microsoft is supporting until next year, and Microsoft checks to make sure XP users aren't installing those Windows Server updates.)

There are, of course, other caveats: While the registry hack doesn't seem to cause any issues, it may not provide the same level of protection as a newer operating system with proper security updates. And unsurprisingly, Microsoft is not amused.

“The security updates that could be installed are intended for Windows Embedded and Windows Server 2003 customers and do not fully protect Windows XP customers,” the company said in a statement to ZDNet. “Windows XP customers also run a significant risk of functionality issues with their machines if they install these updates, as they are not tested against Windows XP.”

Microsoft would prefer that users upgrade to Windows 7 or Windows 8.1 instead, of course, though various Linux operating system variants are viable options as well. Even if you enable this registry hack, you'll still want to take steps to keep your Windows XP PC as safe as possible and upgrade to a more modern—and officially supported—operating system as soon as possible.