Friday, March 2, 2007

Vista's Slmgr.vbs script

Vista keeps track of licensing details using a service called Software Licensing. Slmgr.vbs, a VBScript file included with all Vista editions, allows you to query the current installation and see details about your installation and your licensing status. To run the script, open a Command Prompt window (click Start, type cmd in the Start Search box, and press Enter). There are two things that you can do with this script.

1. Sort out product IDs.
If you have two or more computers running the same edition of Vista, you might lose track of which product key you used for each machine. The solution? Open a Command Prompt window on each machine and type the command slmgr -dli. The -dli switch stands for “display license information” and shows the last five characters of your license ID. Assuming you have the product keys written down, you can use these details to see which key is in use on each machine. If you want more information, use the -dlv (”display license, verbose”) switch instead.
If you choose not to enter a product ID when you install Windows Vista, the Setup program automatically supplies a default key. In that case, the information displayed by slmgr -dli or slmgr -dlv will be one of the following default keys, which cannot be activated:
Business - MRW4W
BusinessN - QXX44
HomeBasic - 3V4VD
HomeBasicN - GFJBT
HomePremium - 76PKF
Ultimate - RP8F7

2. Check your activation status.
From a command prompt, type slmgr -xpr and press Enter to see whether your installation is activated or not. The details appear in a separate information box, not in the Command Prompt window. The information you see will tell you whether your copy is activated. If it’s not, you’ll see the deadline when you’re required to activate.


  1. doesn´t work. It only opens up a folder.

  2. You have to type this line in a command line (run cmd)

  3. Open up an administrative prompt (vista). Then type slmgr -xpr. After a while you should see a box with your activation status. If this wont work there is a problem. Look at Microsoft TechNet and type in the search slmgr parameters.

  4. Use the .vbs extension for slmgr. So, for your examples, use the following:

    slmgr.vbs -dli
    slmgr.vbs -dlv
    slmgr.vbs -xpr


  5. Correct Gene. If not using the vbs extension the system will fail to execute the scripting host. My mistake. I assumed people knew how to run a vbs script.