I found a very useful entry on the website of Daniel Petri.
Everybody using virtual machines knows the issue. You do not want necessarily buy a license for the Product you are running on a virtual machine but you also do not want to use illegal software.
As Microsoft Partner I have access to the Action Pack which provides me with Licenses to the most important pieces of software. Unfortunately you have to register same even you are using this install just for a couple of weeks to test an application…
To extend your trial period, first launch an administrator Command Prompt session and navigate to the following directory by entering cd C:\Windows\system32.
In order to extend your activation period, enter the following command and hit enter:
cscript slmgr.vbs -rearm
The command will take anywhere between 10 and 30 seconds to execute. Upon completion you will receive the following message: Command completed successfully. Please restart the system for the changes to take effect.
Congratulations, you will have successfully rearmed Windows Vista. As previously mentioned you can repeat the same procedure up to three times. Please remember that you must rearm Vista before the activation period ends and Vista enters “lock down.”
With the command cscript slmgr.vbs –xpr you can look how often you have rearmed windows already and when the next period ends.