Windows 7 Failing to Activate

I have been having problems activating my new work laptop. And due to being offsite, and a comedy of errors, the issue wasn’t resolved until today, once it had got the “expired” state.

"This copy of Windows is not genuine"

"You may be a victim of software counterfeiting"

The original activation error was 0xC004F074 and the event log was:

The client has sent an activation request to the key management service machine.  
Info:  
0xC0020017, 0x00000000, USO-AM-WDS-00:1688, ec1ed660-a0d5-4670-8fb1-663d1e70ba40, 2011/10/25 18:32, 0, 2, 27420, ae2ee509-1b34-41c0-acb7-6d4650168915, 25  

Today my IS people provided a .bat that fixed it, that contained:

@echo off  
slmgr.vbs /ckms  
slmgr.vbs /ato  

This needed to be run as administrator.
Reading the Microsoft help for slmgr.vbs shows the first command reset the Activation registry settings, and the second triggers activation.