Every time you reinstall windows operating system you have to activate online or activate using phone method. Worst if you have lost windows product key. We have written guide on how to recover windows 7 product key if you have lost it. Now here is simple batch script (Windows 7 activation Info Backup Tool) which can backup windows 7 activation status.
Once you have backup windows 7 activation status you can restore any time when you reinstall windows 7. The only condition is there should not be any hardware change and this tool is not for bypassing windows 7 activation. You must have genuine windows 7 product key to use this tool.
Windows 7 Activation Info Backup Tool
It also works on Windows server 2008 R1.
Check out :- How to Backup/Restore Windows XP Activation Status.