Getting around Windows Activation when Virtualizing



(Time required = 30 minutes) Scroll down to Setting up Automatic Activation to see the process if you are not interested in the background.


When I first setup my VMware Server to run an existing Windows Install from a physical partition, I was asked to reactivate Windows XP before I could use it as a guest OS. All this required was to enter the product key, request verification and within a couple seconds everything ran fine. I received a lot of complaints from people saying that they were then again asked to reactivate Windows again once they booted back into Windows natively, and then again under VMware and so on every time the OS was booted in a different environment. I wasn’t sure what to tell readers and a web search brought up an endless number of forums with the same problem but no answers. My favorite answer had to be this one from a Microsoft tech saying “Running a virtual machine counts as running two copies of Windows”. Really? Maybe he should have read the user’s question more carefully. Regardless, I couldn’t really help since I couldn’t reproduce the problem.; that was until I upgraded my hard drive this week.

I found myself experiencing the same problem others had mentioned; I would boot natively and be asked to reactivate, it would work fine until I booted the VM and was again asked to reactivate. Remember that WPA (Windows Product Activation) typically allows you to reactivate twice through the internet and after that it requires you to call in. This meant that I was calling up MS every time I wanted to boot in a different environment; hardly practical considering it takes 10 minutes each time activating over the phone.

Reading up on WPA I learned that there are two files used to store the hardware info along with WPA data, WPA.dbl and WPA.bak (These files reside in C:\Windows\System32). If you go through the activation process in Windows natively as well as under VMware you will notice that the file size changes each time you reactivate. This means that if you replace the WPA files prior to booting based on whether you’re using VMware or booting natively you won’t have to reactivate. You will have WPA files for your native hardware and WPA files for your virtual hardware, just swap prior to boot.

I set out to write a script in Linux to perform this but ran into a much simpler solution that a Mac user developed. Linux users can follow the steps below to achieve the same results.

Setting up Automatic Activation

Step 1:

Boot into Windows XP natively. You will be prompted to activate your copy of Windows (if already activated, skip activation and just copy the files). Go ahead and reactivate your copy, this can be as simple as doing it through the web or going through a 10 minute phone call with Microsoft’s automated machine. Once Windows is activated:

-Navigate to C:\Windows\System32

-Create a new folder and name it “nativeboot”

-Copy and paste wpa.dbl and wpa.bak from C:\Windows\System32 into the new “nativeboot” folder

Step 2:

Boot into Linux. Run VMware and boot into Windows XP. You will be prompted to activate your copy of Windows. Go ahead and reactivate your copy, this can be as simple as doing it through the web or going through a 10 minute phone call with Microsoft’s automated machine. Once Windows is activated:

-Navigate to C:\Windows\System32

-Create a new folder and name it “vmware”

-Copy and paste wpa.dbl and wpa.bak from C:\Windows\System32 into the new “vmware” folder

Step 3:

You now have a copy of the WPA info for both your physical and virtual hardware! The next step is to guide Windows to use the right set of files when booting. The easiest way to do this is to setup a script that will be run when Windows boots:

-Open Notepad

-Copy and paste the following code:

@echo off

ipconfig /all | find "VMware" > network.tmp
for /F "tokens=14" %%x in (network.tmp) do set vmware=%x
del network.tmp

if defined vmware (
  echo VMware
  copy C:\\Windows\\System32\\vmware\\wpa.* C:\\Windows\\System32
) else (
  echo Native Boot
  copy C:\\Windows\\System32\\nativeboot\\wpa.* C:\\Windows\\System32

-Save the file as “activation.bat” in C:\

-Go Start>>Run>>gpedit.msc>>[enter]>>Computer Configuration>>Windows Settings>>Scripts>>Startup>>Add

-Choose “activation.bat” as the script to add.


Windows should now automatically choose the right WPA files and not require activation as you restart or change from physical to virtual hardware.

Additional Thoughts

Nevertheless, the fact that users need to go through this process to get their systems working is beyond stupid. WPA has in no way eliminated piracy and problems like this many times lead users to ditch legal software and go the route of pirated software which isn’t infested and crippled with WPA. It’s clear that Microsoft did not foresee these problems and still fails to address them. The fact that a call to MS tech support will result in them telling you that you will need two copies of Windows when virtualizing shows a lack of understanding as well as a lack of a clear solution. Even if you were to pay MS an additional $300 you would still be where you started if you are trying to virtualize a physical partition, you would just be out $300. This is because each copy of Windows can only handle one WPA file and can only be installed on one PC. When you switch environments, WPA thinks you are completely changing computers and requires reactivation. MS will try to tell you that virtualization requires two copies of Windows and that you are violating the EULA by virtualizing the same copy. THIS IS NOT TRUE. You only installed Windows once, it’s all the same set of files, and you’re still technically running it on the same original hardware since you are using the same CPU, Mobo, HDD, RAM, NIC, etc. What you are doing is not in violation of the EULA and don’t let Microsoft’s limitations in software design limit your options and your computer’s functionality.

49 Responses to “Getting around Windows Activation when Virtualizing”

  1. 1 james

    why does this surprise anybody?

    microsoft wants you to pay twice for running the same copy of software.

    this isn’t something the overlooked it is designed this way. they are out to keep their stockholders happy.

    to keep feeding the company money when there is linux available is isanity. I just quit buying their products and am strictly using linux and will never look back. bye bye microsoft – my data is my data and I want to store my data in a truely open format like ODF.

  2. 2 Conrad

    The code sample above is missing backslashes.

  3. 3 kev

    I think there might be some backslashes missing in your script. I assume that WordPress’s code formatting is to blame :).

    Really smart script, though… I thank you for your contribution.

  4. Thanks for catching that guys, it is WordPresss formatting the code, a simple double slash fixed the problem. Let me know if I missed any.

    James, thanks for the comment. I understand MSFT wanting you to purchase two separate copies if you were doing a new install on a virtual disk. But this should not be the case when virtualizing a physical partition since Windows is not being installed again. Moreover, buying a second copy for installing on a virtual disk will fix your WPA problems but buying a second copy will not fix your WPA problems for booting a physical partition. The fact that they tell customers with this problem to buy a second copy is just plain stupid. There is nothing that I would love more than to run only Linux but that is not a feasible solution for me or others as you can see from the comments. The software market being what it is, there are certain applications that are only available in Windows and sometimes for school or work you just need to use them.

  5. 5 john

    do you know if this works in vista?

  6. Haven’t tried it, but from what I’ve read Vista uses a totally different WPA process. You can always give it a try and find out.

  7. Thanks for article

    for more information about windows and linux support:

  8. 8 County Pyr

    Hi Mohammad

    Your effort is greatly appreciated. Could you please let us know where the missing \\ (backslashes) are to be placed?


  9. County Pyr, I have already replaced the missing backslashes, the script should work in its current form.

  10. Salam M Azimi,
    I am thankful for your articles on using Virtual Machines in different ways, Could you please write a small article on how can i easily use a Virtual Machine created in Windows in Linux Host OS and vice versa.

    many thanks.

    Malik M Junaid

  11. I’ve tried to follow the above, but don’t seem to have a WPA.dbl – I have a wpa.bak file, but not the wpa.dbl.

    Any ideas?

    WindowsXP Professional, Version 2002, Service Pack 2 (Dell OEM)

  12. Nevermind – it is there now.

    (Maybe it only appears after the first restart after activation? Myabe I just didn’t hit view by name and refresh?)

  13. 13 Scottie

    Hi Mohammad,

    thanks for the script.
    Any Idea if this works also for “Microsoft Office 2003” or is there a similar mechanism?
    I’ll have to reactivate Office, but i don’t know i which environment to start with..and what to backup..

  14. 14 Andrew

    I’ve read the answers given by Microsoft techies about this problem. It’s quite a feat to be so obtuse about a simple matter. They don’t even try to understand what the customer is saying (despite the provided links). Their own arguments show that User profiles in Windows is a scam. That exchange would have made a perfect script for a Buster Keaton movie. It’s no wonder that Microsoft produces shoddy software despite hiring legions of talented people.
    One way out of this mess would be for companies like Adobe to start releasing *nix versions of their applications, the way Oracle does.

  15. 15 Ben

    And don’t forget to take into account “Fast Logon Optimization feature” i.e. to remove it, for script to work at startup 😉

  16. 16 william

    idk if its my copy of windows or what… maybe its because i dont have any updates past SP2 (i have SP2 installed but nothing after) but i cannot open gpedit.msc…

    ill do a google search on it

  17. 17 Lukas

    I have XP Home Edition SP2..I’m so glad others running VMs understand our problem. But anyways, I don’t have the wpa.bak file.
    Do i really need it? (i have a wpabln file)

  18. 18 Mike

    Sorry if this is a dumb noob question, I am new to Linux…. Would the WPA issue apply if I have a dual boot Lin/Win and also have a VMWare Windows as well ?
    (I am intending to get rid of the dual boot eventually and just use a VM but in the meantime I want to have both – I guess I’m “evaluating” whether switching fully to Linux is viable for me).

    Thanks for posting this article.

  19. 19 Senti

    Has anyone seen/used/written a version of this script that works with Virtual Box?

  20. 20 rudi

    What modifications does the startscript need, when I’m using Virtualbox instead of VMware?

  21. Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

    cheers, Frank.

  22. 22 Script modification for VirtualBox ...

    … found a solution:

    You have to check the name of your VirtualBox Network Adapter in the virtualized Windows. For this do a ‘ipconfig /all’ in a “DOS-Box” (start – run – cmd – enter) and look for something like ‘Ethernetadapter der AMD-PCNET Familie’ (in my case in german).

    Now change the value ‘find “VMware” in line 2 with a part of the name of your VirtualBox Ethernet Adapter, for example with ‘find “AMD-PCNET”.

    Save the script and GOOD LUCK !!

    @Mohammad Azimi -> thank you for your very helpfull article. Great work!

  23. 23 Timothy Palpant

    This trick no longer seems to work after updating to SP3. Any ideas, or are we screwed over by oh-so-lovely WGA again?

  24. 24 Marve

    This is a great idea, except that it doesn’t seem to work for me. My wpa files does not change size or date modified after activation . When rebooting from virtual to native, Windows still wants to activate within 3 days. Any hints? By the way, I have XP Pro SP 3.

  25. 25 Heruan

    Does this trick works with SP3? I get wpa.* files swapped but Windows still claims for reactivation… And I can’t activate anymore, sigh 😥

  26. thanks Mohammad. Iranians Rock!!!

    Your friend Reza from Karaj, Tehran.

  27. 27 golfswingdigest

    Nice article, after reading some of the replies there needs to be a solution to SP3, anyway this is a time saver.

  28. 28 promdi

    hello there…im just wondering if someone will help me with my problem…i have WPA.DBL in my system 32 but no WPA.BAK.

    just recently have clean install of windows xp and not know about backing up WPA.DBL & WPA.BAK not until i was getting a reminder evertime i booth that i only have 26 days activating windows.

    my question is where i do i get the WPA BAK files i only have WPA.DBL i know now that those two are partners but then im really wondering why i dont have the WPA.BAK.

    please any help will do and sorry for my ignorance in these matter.

  29. 29 Mat Smith

    Wow, I just read this page.

    It never ceases to amaze me how happy people are to misinterpret legal documents (a EULA in this case) for their own gain.

    When they do, they tend to justify it by saying “well isn’t Microsoft a big huge corporate and aren’t they wielding their power over us poor individuals?”

    I agree that Windows XP’s EULA wasn’t designed for the emerging market in virtualisation (think a little about when it was written, and the state of play at that time, and the fact it’s not possible to change an EULA for a given product once you’ve already put it on a market), but saying that Microsoft are showing “a lack of understanding as well as a lack of a clear solution” is a tad disingenuous.

    The EULA states that a Windows XP licence pertains to one device, and one device only. One, at any given time. There is a little slack in the EULA, designed so that when someone changes their hardware, they may still actually use Windows – but that slack is not there to allow multiple copies of the OS to run. It’s there to make life easy. That’s a nice thing to do.

    It riles me when software companies make things a little easier for the user, then the user responds by claiming that they are ‘owed’ that right and that the company is terrible for making your life difficult.

    > “MS will try to tell you that virtualization requires two copies of Windows and that you are violating the EULA by virtualizing the same copy. THIS IS NOT TRUE.”

    Hmm, maybe using ALL CAPS strengthens your small-minded feelings on the law against the actual truth of the matter.

    Even if you don’t run multiple OSEs simultaneously, I would suggest that *you* read the EULA instead of asking your readers to. Have you actually read through it, or are you just saying you have?

    If you find the EULA uses words that are too long, may I suggest you refer to this site, which puts it a little more simply:

  30. Mat Smith, I’m sorry you were having a bad day and need to resort to name calling but I suggest you read the entire post before you criticize me for having problems with “words that are too long” and being “small-minded”.

    You state: “The EULA states that a Windows XP licence pertains to one device, and one device only. One, at any given time. There is a little slack in the EULA, designed so that when someone changes their hardware, they may still actually use Windows – but that slack is not there to allow multiple copies of the OS to run. It’s there to make life easy. That’s a nice thing to do.”

    If you actually read the post and knew what was being discussed you would realize that this method is not to “allow multiple copies of the OS to run” at once. I have a Windows install and I virtualize that same Windows install within Linux. I have not reinstalled or copied Windows in any way and it continues to run on the same exact machine from the original install.

    Just FYI, the EULA states:
    “1.1 Installation and use. You may install, use, access,
    display and run one copy of the SOFTWARE on
    the COMPUTER. The SOFTWARE may not be used
    by more than two (2) processors at any one time on the
    COMPUTER, unless a higher number is
    indicated on the COA.

    1.2 SOFTWARE as a Component of the COMPUTER – Transfer.
    This license may not be shared, transferred to or used
    concurrently on different computers. The SOFTWARE
    is licensed with the COMPUTER as a single integrated
    product and may only be used with the COMPUTER.”

    I am doing exactly as the EULA specifies running one install of Windows on a single machine. I have not setup a virtual environment where I reinstall Windows and use the same product key, it is all the original install. Also, my problem with Microsoft in the matter of XP (mind you this was posted 1.5 years ago when XP was still being sold and supported) is that they didn’t have a clear solution for this problem. Even if your false claims were true and I had to purchase another license, XP would still have issues with licensing and lock itself up.

  31. 31 kvdm


    this blog tought me a lot; however, after following the instructions, the script is not loaded prior to boot. Does this have to do with XP service pack 3 (as suggested by some comments)? or is the “Fast Logon Optimization feature” the evil-doer (I don’t seem to be able to find it in the GPO). manually replacing the wpa.* files in the systems32 folder and then restarting windows also seems to work, but is just as time-consuming as reactivation… I guess I won’t switch too often between the vm and the native boot.

  32. 32 urteaga

    Hi all,

    I am also running into the same problem of virtualizing (using VirtualBox in Ubuntu 8.10) my physical Windows XP SP3 partition. I therefore get the Windows Activation messages every time I boot WinXP using VirtualBox.

    I was planning on using the solution proposed by you, Mohammad, but I have seen some issues and I was wondering if Service Pack 3 had something to do with it as mentioned in some of the posts.

    First, I can only find the wpa.dbl file within my system32 folder. Second, windows activation does not let me activate my virtualized version. Does any of this have anything to do with Service Pack 3?

    I would truly appreciate if I could get some advice or help, since I deeply want to keep using VirtualBox.

    Thanks in advance for your time.

  33. It seems as though this workaround does not work with SP3. I’m no longer using this setup but hopefully someone who is can come up with a workaround.

  34. 34 Mick

    Can you perform the login script under Windows XP Home edition SP3? I’ve tried and cannot get the script to run before the login screen.

  35. 35 viy

    Hi all. The solution almost works for my XP pro SP3.

    1. I successfully reactivated XP under VMware and newly generated wpa.* files were different than original ones. I made 2 dirs as proposed by author.

    2. Startup script doesn’t run before user login script appears. Instead it only runs after successful user log in. (Here I guess that SP3 changes the way the startup scripts are handled)

    I started to think how to launch the script…

    * I remembered old DOS times and autoexec.bat, but XP only parses it for env vars only. won’t work any way.

    * I’ve downloaded W2K3 Server Resource Kit and install script as Windows Service using srvany.exe from the ResKit. Still doesn’t work – service is started also after user login. Very strange. But I gave up and:

    * added some simple lines to vmware startup script:
    they copies vmware-activation files to mounted /media/disk/WINDOWS/system32/ before starting vmware binaries
    also I removed `exec` from line launching vmware binaries and added after this line the lines which restores native-activation files after vmware exits

    I know it isn’t so smart and elegant solution as proposed by author but it works for me.

    PS. For someone who said that files didn’t change after reactivation. My system was installed as XP+SP1_integrated then activated and then SP3 was installed. May be this is a point if you will compare with XP+SP3_integrated, I don’t know.

  36. How do I reset my password?
    Musca Law
    Musca Law

  37. This is an great post, I will be adding this blog to my morning routine.

  38. That’s unacceptable! Apple never used to be quite that. I am seasoned enough to think back to the very first like that even had pointer recognition AND 2 buttons, let alone all this stuff they have.

  39. 39 Eric

    I struggled with this myself recently and even installed the script. I was hoping it would solve what I thought was an activation loop with my SP3 slipstream. In the end I disabled the script and finally discovered that Windows seems to be happy switching between two different activations. I *think* Windows XP is okay with switching back and forth between the last two configurations that you’ve activated. Note that installing VMWare Tools causes hardware to change enough that a second activation is required there.

    So I’m now to the point where I can boot the same partition into Windows XP (native) with one hardware config, and also into VMware Player with a different hardware config. And I’m no longer bothered to re-activate.

    This lets me run iTunes inside of VMWare on my MythTV box and download TV shows, etc.. Unfortunately playback is intolerably slow through vmware, so I have to reboot into windows natively and then playback is fine. It’s a bit of a hassle, but it’s cheaper than an AppleTV! (and adminstering yet another box)

  40. 40 Robin

    Hi guys! Great site. Thanks to it I got my Native/Guest configuration up and running in no time. I might have found another (pretty easy if it works, did for me) solution to the activation problem with SP3. After a lot of browsing I worked out this solution (based on VBox, don’t know if it works in VMware as well):

    1. When in Native, Start>Run>cmd>”ipconfig /all”. Check the MAC (physical) address and write it down.

    2. Reboot and start VBox (don’t start guest OS)

    3. Enter Settings for Guest. Then go to the tab Network and click Advanced.

    4. In the field “Hardware address (?)” (I’m not running the English version, but it should only be one field for you to type in) erase the existing address and enter the MAC address from your Native without dashes.

    5. Switch between Guest and Native a couple of times to make sure it works.

    6. Done!

  41. 41 Tianon

    I know it’s a total necro-post, but I wish something for Windows 7 would be this easy.

  42. 42 Paul

    Thanks for this guide. I am trying to install microsoft office 2007 in VMware. The problem is the Office 2007 activation. With this method I saved the activation files before installing MS Office in VM ware and than after installing MS Office 2007 in VMware it does not reactivate automatically. Can you please help me how can I activate my genuine Office copy in VMware. Thanks.


  1. 1 Top Posts «
  2. 2 Windows Experience Index on the MacBook Pro 15″ 2GHz compared » DamienG
  3. 3 It’s all in a day’s work » Blog Archive » Using VMware player for testing Internet Explorer on Ubuntu
  4. 4 Running existing Windows in VirtualBox on Ubuntu «
  5. 5 start installed Windows Vista from Linux using VirtualBox « Willing wheels
  6. 6 Quest For Portability | Conquer Self Before World
  7. 7 Virtual Machines (part 4) – VMware Convertor – Average Joe Tech

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: