Search CFJ

July 26, 2007

Tip: Change your Windows XP key


Change Windows XP Product Key
Updated 07/26/07
There have been a few times when I run across a computer that has an illegal version of Windows installed, and I tell the owner that they need to purchase a license to make their installation all good...then what?

In the old days, a user who ran into this problem might keep their installation of Windows with the invalid key, but would buy a copy of Windows and posses a certificate of authenticity to prove that they had a legal copy.

However, now with the Windows Genuine Advantage (and the awesome validation tool - sense my sarcasm?), doing this will only cause you suffering as you won't be able to access Windows Updates, genuine Microsoft downloads, and other MS "niceties".

So, now, your "built-in" options are:
  • Reinstall Windows
  • Run Sysprep mini-setup wizard
That's pretty much it. Otherwise, you will be without critical updates at the very least, which can cause your computer to become vulnerable to attack.

Obviously, re-installing Windows is something that a lot of people would not want to do, as most installations have been tweaked to user spec over months and months (years?), and re-creating this will most likely be a painful and frustrating affair.

Another way would be to download and run Microsoft Sysprep, which ironically, requires you to validate your copy of Windows before you can download it. Sysprep is, like the name infers, a system preparation tool. OEM manufacturers and corporate IT folks have been using it for years after the computer has been cloned (or after RIS), allowing specific customizations in an automated fashion (and 'resealing' the installation, so it can detect new hardware).

As a side note, Sysprep helps keep your network free from duplicate SIDs, resulting in wonky WSUS client behavior.

There are alternative utilities (thank you to Carputers and Erik) which are listed at the end of the article.

The alternative?

Change your product key. While this method is not supported by Microsoft, it does work, and can save you from having to touch every computer that may need its key changed.

http://tinyurl.com/yrccbb

Download the linked script, name it something like 'productkey.vbs' for example, then run the following command:

x:\pathtoyourfile\productkey.vbs xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (of course, using your valid & legal product key here!)

You should get a message telling you if you were successful or not. Reboot your computer - you should now be able to access Geniune Microsoft downloads, Windows Updates, and more!

Remember, if you have a copy of XP Home, you need to use an XP Home product key, likewise for Pro or Windows 2003. I do not know if this script would work with Vista...I would think it would not.

The benefit of using VBScript

You can totally automate this process without any prompting on the user's part, which makes it a valuable add for any IT administrator. There are other tools available, but there is a bit of user interaction required...they are good for the single PCs here or there.

Also, some companies don't like using third-party tools that are not a part of the operating system, so this may be the ONLY feasible solution for them.

Ok already, on with the code!

Here's the actual VBScript code if the download link above does not work:
' This script changes the product key
' on the computer (XP SP1 SP2 2003)
' (watch for word-wrap)
' Made by zyling.

ON ERROR RESUME NEXT

Dim VOL_PROD_KEY
If Wscript.arguments.count < 1 then VOL_PROD_KEY=InputBox("Operation instructions " _ & "(OEM KEYS not supported):" & vbCr & vbCr _ & "This script will revise the current product key " _ & "of Windows. Please input the correct cd-key " _ & "in the field below." & vbCrlf & vbCrlf _ & "Input CD-KEY(Default XP VLK):","Windows " _ & "XP/2003 sequence number changes tools ","(Insert " _ & "key here)") If VOL_PROD_KEY="" then Wscript.quit End If Else VOL_PROD_KEY = Wscript.arguments.Item(0) End If 'remove hyphens if any were entered... VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") For each Obj in _ GetObject("winmgmts:{impersonationLevel=impersonate}"_ ).InstancesOf _ ("win32_WindowsProductActivation") Result = Obj.SetProductKey(VOL_PROD_KEY) If Err = 0 Then Wscript.echo "Your Windows Product Key was changed " _ & "successfuly. Check your system properties." End If If Err <> 0 Then
Wscript.echo "Error entering new product key ['" _
& VOL_PROD_KEY & "]! Please verify that this " _
& "Product Key was entered correctly or is a valid key."
Err.Clear
End If

Next
Alternates (special thanks to my readers who submitted comments!):

9 comments:

Erik said...

Microsoft also has a "Windows Product Key Update Tool" that will update your system (see http://www.microsoft.com/genuine/selfhelp/pkuinstructions.aspx).

maximillian_x said...

Thanks Eric - very cool!

Carputers said...

Dude, Rock XP is the shizz for this:

http://www.majorgeeks.com/download4138.html

The author's site is down as I am posting this, hence the MG linkage...

maximillian_x said...

Carputers - nice find!

Carputers said...

Rock XP direct link:

http://www.rockxp.org

maximillian_x said...

Carputers - updated, thanks again!

Anonymous said...

try XP KEY CHANGER from moonvalleysoft.com

Anonymous said...

i tried Xp Key Changer to change xp product key on 2 machines, good tool

jim said...

I agree, worked fine, download the trial here (if the link is accepted) XP KEY CHANGER