Page 1 of 1

Activating XP through both VirtualBox and Bootcamp

Posted: 15. Feb 2012, 07:31
by Beaker_de
Hi Everyone,

After huge grief, I got one installation of windows XP running both with bootcamp and also virtually through OSX with VirtualBox.

The only problem, after I activate windows in Virtualbox and then boot up with bootcamp, windows detects a change in hardware and gives me 3 days to reactivate. Vice versa is also true. If I activate windows through bootcamp and then restart with OSX virtualbox, same problem happens. I need to phone in every time to reactivate and it's a major hassle.

I found this solution, but am missing one vital step at the bottom. Perhaps someone may know how to do it?:


---Solution below---
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.

---end of solution---

The code is to detect if it's done with VMware though, not VirtualBox. Do you know how I can detect if it's running through virtualbox instead of VMware?

Thanks

Re: Activating XP through both VirtualBox and Bootcamp

Posted: 15. Feb 2012, 14:00
by mpack
This is a variation on the theme of "XP in both a VM and Native", as discussed in the "Windows Guests" section of the "Howtos and Tutorials" forum. I suggest that a read of that thread would be useful, and easily adapted to a Mac host using Bootcamp.