Home > IT-howtos > How to rearm and change activation key on Windows

How to rearm and change activation key on Windows

Recently I experienced a 3 hours LOB delay because of Microsoft’s infamous activation policy. The background was trivial: P2V migration. Should work right out of the spot, right? I mean, using Sysinternal’s disk2vhd is a straight-forward process and moving to a Microsoft homogenous environment – meaning, moving to Hyper-V – should be a piece of cake.

Well, there are some caveats, especially when you are moving Client OS and not Server OS. And that is the MS activation: if you are moving a Server OS, like Server 2003 (R2) and above you will land with a 3-days grace period to activate, which is enough time to install Hyper-V Integration Services and using the mouse, activate, or even change the key comfortably. But what if you are trying Windows XP? You are moving the machine, configuring it through Hyper-V manager and starting. Then on the console you are welcomed with a pop-up screen to activate. If you disagree you are logged off momentarily. You are the clever guy who doesn’t give up and try to agree, but since the drivers for Hyper-V are still not installed you are using the keyboard and attempt to activate over the phone. This takes you about half an hourJ But what if you want to change the key – let’s say you are moving from an OEM machine and want to insert a retail license key? If you try to change the key from the telephone activation windows, don’t be surprised if no new activation token is being created. This takes another half an hourJ OK, we don’t give up, do we? Just restart in Safe Mode and try to install Hyper-V Integration Services. Only via keyboard, mind you. The installation breaks somewhere in the middle and you iterate the procedure just to be sure that it was not your fault and to round up the next 30 minutesJ You finally come to the brilliant idea to rearm in Safe Mode. Fine, but regrettably there is no such command under XP. Good ol’ times, forgot, forgot, rapidly accustomed to the Vista / Win7 world. You lavish another half an hour googling / binging to find out what the commands were. And bingo, finally rearm in Save Mode, restart, logon, install the Hyper-V drivers, find your mouse in the corner and full with joy return to the usual Windows world, causing you the rest of the wasted time.

So if you by any chance happen to stumble across this blog in the proper moment you can save at least half of your time with the following information.

Remark: for the current purposes “rearm” means reset the activation period of the OS.

For versions of Vista and above, to rearm a computer you run the command:

slmgr.vbs –rearm

Similarly easy from the System Properties GUI (Win+Pause) you can change the activation key.

For Windows XP there is a more complicated solution. To rearm the computer you run the command:

rundll32.exe syssetup,SetupOobeBnk

You can check if it worked by looking In Event Viewer under Application tab, should say you have 30 days to activate

To change an activation key you have to create a .vbs file with the following contents and provide the new key as parameter:

ON ERROR RESUME NEXT

if Wscript.arguments.count<1 then

Wscript.echo “Script can’t run without VolumeProductKey argument”

Wscript.echo “Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX”

Wscript.quit

end if

Dim VOL_PROD_KEY

VOL_PROD_KEY = Wscript.arguments.Item(0)

VOL_PROD_KEY = Replace(VOL_PROD_KEY,”-”,””) ‘remove hyphens if any

for each Obj in GetObject(“winmgmts:{impersonationLevel=impersonate}”).InstancesOf (“win32_WindowsProductActivation”)

result = Obj.SetProductKey (VOL_PROD_KEY)

if err <> 0 then

WScript.Echo Err.Description, “0x” & Hex(Err.Number)

Err.Clear

end if

Next

About these ads
Categories: IT-howtos
  1. July 22, 2013 at 7:15 PM

    Danke für die präzise Auffassung :)

  1. July 22, 2013 at 8:17 AM

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: