Reinstall windows 7 keeping license

💖 Like it? Share the link with your friends

How to make a copy of the license files with an activated OS and use them when reinstalling?

The situation is not standard, but sometimes it can come in handy, as it was in my case - it was acquired not so long ago system unit, at the same time acting as a 1c server in one of the stores. After a couple of months, it was noticed that the computer began to boot for a very long time (30 minutes). Trouble detected during diagnostics hard drive. When trying to create an image using acronis true image, errors appeared and it could not be deployed.

So it was decided to buy a new one. HDD and install the same system on it. But the fact is that Microsoft allows you to activate a very certain number of times, and from time to time you have to reinstall Windows - like mine. Just for this, it was necessary to maintain the status of the license.
So how to do this as if no one had reinstalled anything? It’s worth mentioning right away that the method described below will only work with the same hardware as it was, and for the same Windows versions. In my case, only the hard drive has changed.

  1. We write down the installation key that we used for the current copy of Windows (on the box, on the system unit, from a still working system)
  2. Copying files

    \Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\Tokens.dat \Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms for

    The 64-bit version also needs to copy this file:

    \Windows\SysWOW64\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms

  3. We reinstall the OS. When we are asked for a key, we do not enter anything, leaving the field empty and continue the installation.
  4. After installation, run command line(CMD) with administrator rights and stop the OS file integrity monitoring service:
  5. Let's go to the folder:

    \Windows\System32\spp\tokens\pkeyconfig\

    and give ourselves full rights to the pkeyconfig.xrm-ms file. To do this, right-click on it and select "Properties", go to the "Security" tab, click "Advanced", become its owner, then close the properties window and open it again, giving yourself full rights.

    Now delete this pkeyconfig.xrm-ms file and copy it from the backup

    For 64-bit OS, you also need to go to the folder:

    \Windows\SysWOW64\spp\tokens\pkeyconfig\

    and follow all the steps as for the previous folder with the pkeyconfig.xrm-ms file.

    Now go to the folder:

    \Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\

    and follow the same steps, deleting the current tokens.dat file and replacing it with a backup copy.

  6. We start the file integrity control service back. Again, open CMD with administrator rights and execute:
  7. Now we will specify the key, through the slmgr.vbs utility, which is part of the OS out of the box.

    slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    where instead of xxxxx-... we enter the Windows key.

  8. In general, everything. Now Windows is activated. You can check this, for example, through the same utility:

    slmgr.vbs-dlv
    slmgr.vbs -dli
    slmgr.vbs -ato

Close all windows and reboot. Checking the activation status in "Computer"

You are downloading a new Windows image from the official Microsoft website, start the installation, enter the license key from the sticker on the laptop case ... and get an ominous message that the system is already in use. How to reinstall Windows if it came with the device and you honestly paid for the license?

How to restore the system if it was preinstalled?

The problem with pre-installed Windows is that it is not Microsoft that sells it to you, but the laptop manufacturer, and in the amount of one specific copy, for which he himself bought a license from Microsoft. The license key for this copy is often hardwired directly into laptop BIOS. And you can restore the system with this license key only from the image of the Windows that was installed on your laptop.

Therefore, the best way to restore an OEM copy of Windows is a backup restore point created by the system itself - for example, automatically using Windows Defender.

Here's how to reinstall Windows using a restore point:

  1. Download the system image from the official Microsoft website: Windows 7, Windows 8.1, Windows 10. You may be required to enter a license key. Where can I get a license key if the computer was sold with a pre-installed OS? As a rule, it is applied to the laptop case or box in the form of a sticker (the so-called certificate of authenticity, Certificate of Authenticity). If the sticker is lost or damaged, you can contact your computer vendor - they may have a way to recover the key.
  2. Burn the image to a CD or flash drive using a tool that is convenient for you - for example, UltraISO or WinSetupFromUSB.
  3. Insert a disk or USB flash drive into the computer on which you want to reinstall Windows and boot from them by setting BIOS boot from a CD drive or flash drive.
  4. Windows installation will start. In the installation window, select the system language and other options, and click Proceed.
  5. In the next window select System Restore(Troubleshooting > System Restore on Windows 10).
  6. Select a system restore point. Most users will have one.
  7. Wait for the recovery procedure to complete, remove the flash drive and boot from the main hard drive.

This method allows you to return Windows to a healthy state. In this case, a number of programs that you installed after creating the restore point may be lost, but the system will work and, most importantly, the license key will remain active.

How to reinstall Windows from an emergency recovery flash drive?

Another way to reinstall Windows without losing your license is to use the disk disaster recovery. It must be created in advance, best of all - immediately after buying a computer. There are several ways to do this:

  • A number of computer manufacturers provide tools for creating recovery discs, such as the Samsung Recovery Solution for laptops from the same manufacturer. Check if you have such tools and use them.
  • You can use the standard Windows tool - Backup and restore (Backup and restore in Windows 10) accessible through the panel Windows controls. It is enough to open the built-in utility, select FROMcreate a system recovery disk, connect a USB flash drive to your computer and follow the instructions.
  • You can also use third-party system imaging tools, such as those described in .

If you have a recovery disk, reinstalling licensed Windows is as follows:

  1. Insert the emergency recovery flash drive into the computer where you want to reinstall Windows and boot from it.
  2. The Windows Recovery Environment will start. Select System Restore >(Troubleshooting > Restoring a System Image on Windows 10).
  3. Select the latest available system image and click Further to start recovery.

The system will be reinstalled from the image, but the license key will also remain valid.

These two methods are guaranteed to make it possible to reinstall Windows 10, which was preinstalled on a laptop, without losing the license. Alternatively, you can contact the computer or laptop vendor's service center under warranty: according to the terms of the agreement with Microsoft, the vendor is responsible for the operation of your system.

When buying a laptop with pre-installed Windows 7 or 8, we do not think that someday problems may arise with this OS:

Viruses can eat it - if you did not install a good antivirus in time or forgot to renew it.
- Over time, Windows may just start to work very slowly and there will be no other way out but to reinstall it.
- But you never know what may be the need for a new OS on a laptop.

So, when buying a new laptop, they usually don’t pay attention to all this and don’t even ask the seller a question about how to reinstall Windows if problems arise with it.

A little about the OEM version:

The OEM version of Windows (in short) means that a regular user cannot install it from a disk - only specialized centers and stores can do this, therefore they do not give a disk with the original OS.
- We cannot install the OEM version on any other laptop or computer with other hardware
- I.e. when buying an OEM version, we tie Windows, forever, to our hardware, and when it fails, we say goodbye to the license for Windows.

But let's continue:

In the future, they begin to look for ways to solve problems and realize that they were not provided with a disk with the operating system. Downloading pirated Windows means that we paid for licenses in vain. Of course there is a way to download original system install from any Zona torrent and enter the Windows code located on the back of the laptop.
However, first you should think about the fact that laptop manufacturers really do not care about their consumers at all and leave them to their fate. Of course no.

When buying a laptop, you may be given a Windows recovery disc, but in this moment this is not practiced, and the recovery tools and the original system image itself (the factory OS, so to speak) are located on the hard drive itself, and the system has a program (usually a laptop manufacturer's program). Once you press it and run it, you will be prompted to create an image for the current date for subsequent recovery or restore the system to factory settings, i.e. since it was delivered to you on the day you bought the laptop.

It's no secret that in order to use Windows 7 or Windows Server 2008 R2, as well as Windows Vista or Windows Server 2008, you need to activate the system. Activation of Windows 7 and Windows Server 2008 R2, except when the computer or server was purchased with an OEM license or activated using a KMS server, is usually performed online, by connecting to a Microsoft activation server, or using an activation technique by phone.

There is one inconvenient moment in the activation procedure: Microsoft limits the number of online activation attempts. If this limit is exceeded, the user has to call the Microsoft activation center on the hotline, and go through the entire stupid process of manual activation by phone.

Also, not many users and administrators like to contact Microsoft again every time they simply format their OS hard drive or reinstall the system. Therefore, it would be great if the activation status of Windows OS could be saved or copied, and then after a system reinstallation could be restored, so that Windows 7 and Windows Server 2008 R2 could be activated offline or without connecting to a Microsoft activation server. By the way, I already wrote about the fact that you should not rush to activate the system during the initial Windows setup Server 2008. Use the following instructions to back up your files Windows activation 7 or Windows Server 2008 R2 that has already been activated. Please note that this technique may only be suitable for those users who perform a "clean" Windows installation, while users who, for example, want to move the system to a larger hard drive can make an image system disk(using software such as Norton Ghost or Acronis True Image), upload this image to a larger hard drive, and thus can easily transfer the activation status along with application programs and data.

1. Copy and save the following files related to Windows activation to an external hard drive or flash drive:

%SystemDrive%\Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\Tokens.dat

%SystemDrive%\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms

Note: for x64 OS copy also %SystemDrive%\Windows\SysWOW64\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms

2. Display and write down the current key you used to install and activate Windows 7 or Windows Server 2008 R2.

3. Reinstall Windows 7/Windows 2008 R2. When the installation wizard asks for a product key, do not enter it, leave the field blank.

4. In the installed operating room Windows system, stop services SoftwareProtectionService via console Services. msc

net stop sppsvc

5. Change to the following folder:

%SystemDrive%\Windows\System32\spp\tokens\pkeyconfig\

Note: In 64-bit (x64) operating system this is a folder % System Drive%\Windows\SysWOW64\spp\tokens\pkeyconfig\.

6. Take ownership of the file or give yourself full rights to the file pkeyconfig. xrm-ms.

7. Delete the original file pkeyconfig. xrm and replace with the backup file.

8. Go to the folder:

%SystemDrive%\Windows\ServiceProfiles\NetWorkService\AppData\Roaming\Microsoft\SoftwarePlatform\

9. Take ownership of the file or give yourself full rights to the file tokens. date.

10. Delete the original file tokens. date and replace it with the backup file.

11. Restart Services SoftwareProtectionServiceWith using snap Services. msc or with the following command:

net start sppsvc

12. Enter the Windows 7 or Windows Server 2008 R2 registration key using the following command:

slmgr . vbs - ipk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX with your actual product key.

13. As a result, Windows will be activated offline. To check the activation status, use the following commands:

slmgr.vbs-dlv
slmgr.vbs -dli
slmgr.vbs -ato

I already showed how you can use this command to remotely activate Server Core in an article about .

Please note that the ability to back up and restore activation status after reinstalling Windows, is possible only if the activation will be performed on the same or completely similar equipment, otherwise you will have to use the online registration procedures or telephone activation. This trick also does not apply to PCs purchased with an OEM license and activated using the KMS activation system.

tell friends