I have recently created a Windows 7 image to be used within our company. Up until a few days ago it was working fine, however it has now started showing a 'Windows is not Activated' window when the user first logs on, and coming up with 'This copy of Windows is not genuine' in the bottom right hand corner of the screen just before you get to the logon screen.
I can only assume this is because it has been 30 days since I created the image, and the grace period has now expired. After a sysprep I would have expected the grace period to be reset so that you get a fresh 30 days after you image each machine, but this doesn't seem to be happening.
I am activating Windows using slmgr in the sysprep first logon commands. It is not possible to run these commands in the setupcomplete.cmd file because they would run under the local system account which has no proxy access.
So to get round this problem I have tried settings skiprearm to 1 in the sysprep file and running slmgr /rearm in the setupcomplete.cmd file. Unfortunately slmgr /rearm needs a reboot, and so the activation window still appears when the user logs on. I have tried adding shutdown /r /f to the setupcomplete.cmd file after the slmgr /rearm, but it just ignores it (although if I manually reboot before the user logs in for the first time everything works fine, the grace period is reset as expected, no activation window is displayed, and windows activates using my sysprep first login commands).
Any suggestions on how to get round this problem would be much appreciated.