How-To Geek

How To Uninstall Your Windows Product Key Before You Sell Your PC


Do you have an old PC you want to sell, but also want to use your Windows license on your new PC ? There is a hidden command in Windows that allows you to do just that. Read on to find out more.

Note: Between Microsoft and your OEM there are a number of different laws that determine whether you are allowed to use your license on another PC, so follow this tutorial at your own risk. Additionally before you go through the tutorial you will want to check that your product key is still attached to your PC/Installation CD, if it is not , do a quick Google search on how to recover it.

Uninstalling Your Product Key

The first thing we need to do is get our activation ID, to do this fire up an administrative command prompt and run:

slmgr /dlv


Windows will open a message box and tell you a bunch of information about the license status of your PC, take note of your activation ID.


To uninstall your product key you need to use the /upk switch, along with your activation ID:

slmgr /upk 507660dd-3fc4-4df2-81f5b559467ad56b


If you do it correctly you will be told that your product key has been uninstalled.


Installing Your Product Key

Installing your product key on your new PC is just as easy, all you need to do is fire up an administrative command prompt and use the /ipk switch.


If your key is valid you will be told that your key was installed.


That’s all there is to it.

Taylor Gibb is a Microsoft MVP and all round geek, he loves everything from Windows 8 to Windows Server 2012 and even C# and PowerShell. You can also follow him on Google+

  • Published 11/7/12

Comments (32)

  1. thegeekkid

    Ever heard of boot and nuke?

  2. Mark Knight

    This is a great post. I have had to wipe machines many times, but never properly un-installed the operating system. Thanks for taking the time to post this.

  3. Kestrel

    Wow…do I need this

  4. Brian

    How does MS know it was deactivated and can be reused? Does it have to be connected to the Internet to do this?

  5. Stu

    What is the ” Remaining Windows rearm count:xx” info line in the /dlv output page?
    Is that count of how many times the key can be moved?

  6. David

    Even tho I think if you buy a copy of windows and use it as you see fit, I’m not sure OEM licensing covers this.. Plus I got tired every time I installed a new card or add on having to redo MS license. I was under the impressing that OEM license married the copy of os to the hardware. When the hardware died, so did the license. But personally I have started to move away from MS Windows.

  7. William Wilson

    I have tried this on two administrator accounts, but a pop-up message says:

    ‘Windows cannot access the specified device, path, or file. You may not have the appropriate
    permissions to access the item.’

    My notebook computer is a HP Pavillion model with the factory original Windows Vista HP os. MS genuine inquiry has no problem confirming the os; no problems with Windows Update. Each acct has a distinctive password. Am I missing something?

  8. Smarty Mc.Smarterton

    Have you tried running command prompt as an administrator?

  9. trm96

    Should you have showed your product key in the above screenshot?

  10. Bob

    This tutorial above does not cover the OEM licenses from the major manufacturers like HP, Lenovo, Acer, ASUS etc. These machines use a pre-activated key that is common to all of the PCs in that model (or manufacturer?). The tag on the back, bottom or under the battery on your PC has a key on it only for license legality needs. It is not used in activating the version of Windows in the machine. Given this, there is no point in going through a de-activation. If you use a key recovery tool like Produkey or Magic Jellybean or a status tool like Belarc Adviser or SIW then you will be shown the key used to activate the Windows (and a lot of other software) on your machine and you can check if it is different from the tag. If the key recovery software reports a key that is all Bs or something invalid, this may be because the key has been removed from the machine by the command:
    slmgr /cpky
    For help on slmgr just run the command without parameters. It has four Help windows. Just keep clicking OK.

  11. William Wilson

    To follow-up, I have been able to retrieve my Serial No using both Specy and Key Finder and they agree. I would like to know why I was unable to confirm those results using your directions; by the way I found other articles which describe removal, but they did not describe how to reinsert the SN after it had been removed (recall that I was not required to insert that value during initial or subsequent installations.

  12. Liq

    @William Wilson

    You need to launch the shell using ‘Run as administrator,’ simply being logged in as an admin may not be enough.

    To do this go to the start menu and do a search for CMD, it should find cmd.exe, right click that and choose run as administrator.

  13. Justin

    Does Microsoft actually keep track of this? Will not uninstalling the product key cause problems if I try to use the key in another Windows installation?

  14. notthesmartestgeek

    Does Microsoft keep track of how many times you transfer licenses? What about like an MSDN license? EX: My MSDN license allows 5 installs. What if I already installed it on 5 machines, but now I want to “uninstall” it from one machine and move it to another? Will it say “you can only install on 5 machines…etc” or will this enable me to do that?

  15. Bugger

    You will probably get a message after you install the os on another computer saying it’s already been registered. I just run the register program and stop where it displays all the numbers in the boxes and call in on the phone line to MS. Just follow the prompts to read off the numbers on the screen and then type in the new numbers and letters it tells you. Works for me. If you don’t register your product, you can’t download updates.

  16. Akoolo

    This is information i have been missing, yet to try and c how it works

  17. trendless

    What Bob said:

    OEM keys (ie came with your computer) = not allowed. Retail keys (bought FPP license separately) = allowed.

  18. Shawn

    Here’s how to remove your MS OFFICE Keys:

    Thanks for this tutorial Howtogeek!

  19. Zinc64

    Only “retail” copies of Windows can be transferred to another machine.

    Don’t know too many people who pay full retail for Windows these days…good luck…

  20. Mark

    I hope that key in the last two screenshots is fake…

  21. Ben

    Looks like the product key is from one of the preview releases of Windows 8.
    No reason to be concerned for the author.

  22. Richard Steven Hack

    As others have said, OEM licenses can NOT be transferred – that is, legally.

    In fact, Windows XP keys can be transferred easily. Microsoft really couldn’t care less in practice. It’s long been said by “experts” that you can’t reactivate an OEM key on another machine, but in practice PC techs do it routinely, usually by following the phone reactivation method – but in many cases you can just reactivate over the Net as you would with a retail key.

    To reiterate, this is for Windows XP. Windows 7 has a different methodology. Check out the MyDigitalLife Web site for numerous tools to shuffle Windows Vista and 7 OEM keys around.

    The only complication I’ve run into with XP is where you have an OEM key on the label, but the box you’re working on is really a “refurbished” machine with a separate “refurbished key” – which is different. Then you have to jump through a couple hoops using a Microsoft utility to change the key.

    Sure, some of this is “illegal”. In practice, it’s unenforceable and Microsoft knows it. The notion that an OS you paid for with your original machine can’t be transferred to a new machine is simply extortion and almost no one is going to adhere to that, especially when the OS – if bought retail – is now the most expensive part of any machine. Really, Microsoft expects people to pay $150 for a new copy of an OS that costs the OEM $50 – on a $500-600 machine? Never happen and Microsoft knows it.

    You can talk “legal” or you can talk “real-world”…

  23. Vaidya

    Are the Product Key and Activation Id different. While uninstalling my product key, using Activation Id, which is different, if I am not connected to Internet, how connection or relevance does it have with the new machine.

  24. Taylor Gibb

    Just to clarify, you dont have to be connected to the Internet. When you try register the key on your new PC Microsoft will see that the key is linked to the GUID of your old PC, and will unlink it from that GUID and link it to the GUID of your new PC. I should have mentioned that in the article.

  25. Paul

    This tip of “slmgr” doesn’t work with XP. Which versions of Windows is it for?

  26. SuAlfons

    In Europe (and maybe other areas aswell), bundling hardware and software is not allowed. So you can legally use an OEM version of any software on any PC (on any ONE PC, of course). You can also buy OEM DVDs of Windows in any computer hardware store – the difference are the missing documentation, packaging and that there is only 32 *or* 64bit included.

  27. William Wilson


    Thanks for this information; I had noticed the lack of relationship between the HP bulk serial no. on the label on bottom of the computer case and suspected that an explanation such as yours was likely., Appreciate the additional info as well.

  28. Spax

    Tried with Success on Windows Server 2008 R2 Enterprise.


  29. Dave

    So what about the scenario where you aquire a PC that has been licensed using a valid VLK, but you want to change it to the OEM license from the sticker on the box. We get this sometimes when we aquire a business, but for whatever reason we can’t use the VLK. We’ve been formatting and reinstalling from an OEM disk but this seems much easier!

  30. blyarts

    how do i download this article for offline use

  31. george

    I’ll just say this:
    I USE LINUX :)

  32. Stinger608

    @ Stu: You quoted: “What is the ” Remaining Windows rearm count:xx” info line in the /dlv output page?
    Is that count of how many times the key can be moved?”

    No, what that is, is the amount of times a person can rearm windows for the 30 day grace period before the activation is needed. A person can install Windows 7 on a system and not activate it for 30 days. Then it can be rearmed up to 3 times after that.

    Does that help?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!