The Deployment Guys

Helping to deploy your world automagically...

Deploying Windows 7 VL with MAK (Multiple Access Keys) using MDT 2010

Deploying Windows 7 VL with MAK (Multiple Access Keys) using MDT 2010

  • Comments 8
  • Likes

My esteemed colleague - Doug Klokow who is a Senior Consultant in the worldwide deployment practice, working with Windows 7 TAP (Technical Adoption Program) customers in the US has put together a most useful set of instructions regarding Windows 7 deployment using MDT 2010 and MAK keys. This is of benefit when deploying to environments where access to KMS may be tricky during the activation timescales – I recently came across this in a university where professors and research staff go off on research assignments for up to a year at a time…When deploying Windows 7 Enterprise Volume License (VL) edition using MDT 2010, it is possible to include a MAK activation key, however, the standard methods of including the key in the unattend.xml file requires modification. Additionally, it is possible to deploy MAK keys using a custom script as part of a Task Sequence.

Situation

While deploying Windows 7 Enterprise VL with MDT 2010, the typical behaviour would be to include the activation key in the customisation wizard used to create a Task Sequence for the deployment of the Windows 7 operating system. By design, the Task Sequence wizard is designed to support retail activation keys, not volume license keys. The difference is subtle, but important to the context of this scenario.

As you complete the New Task Sequence Wizard, you are prompted the Product key.

clip_image002

When you enter a product key into the field shown above, the MDT 2010 wizard adds the code into two specific locations of the unattend.xml file for this task sequence.

clip_image004clip_image006

The first location for the ProductKey is the WindowsPE phase, specifically, the x86_Microsoft-Windows-Setup_neutral\UserData\ProductKey setting.

The second location is in the Specialize phase, specifically the x86_Microsoft-Windows-Shell-Setup_neutral\ProductKey setting.


Issue

The Unattended Windows Setup reference explains why there are two entries for the ProductKey setting, but if the Product Key for Windows 7 Enterprise is placed in both locations (as is the default) when entering the Product Key using the task sequence creation wizard, you will receive the following error when attempting to build or deploy a client machine with that task sequence.

clip_image009


Resolution

There are a number of options available to address this particular situation. Each provides a resolution, but using different methods.

OPTION 1

Simply delete the ProductKey entry in the WindowsPE phase, specifically, the x86_Microsoft-Windows-Setup_neutral\UserData\ProductKey setting. The unattended install should work as expected deploying your Windows 7 machine using the configurations your define. Once the Windows 7 installation is complete, it will be necessary to either manually kick off the activation process from the Computer Properties screen of the machine, or using the Volume Activation Management Tool (VAMT) to complete the activation remotely.

NOTE: At the time this blog was authored, an updated VAMT tool is not presently available with support for Windows 7.

OPTION 2

Use the slmgr.vbs script to perform the activation as a task in the task sequence in lieu of the ProductKey entries in the unattend.xml file. Check the two locations in the unattend.xml file to validate that both entries for ProductKey are blank.

STEP 1: Add the first entry into the Custom Tasks section of the State Restore phase as shown below:

clip_image011

 

Task Name:

Activate Client using VL MAK

Command Line:

cscript.exe c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

Start in:

c:\windows\system32

NOTE: Replace the X's with your VL MAK key for Windows 7

STEP 2: Add the slmgr.vbs /ato script to automatically activate the client during deployment as shown below:

clip_image013

 

Task Name:

Activate the machine using the VL MAK

Command Line:

cscript.exe c:\windows\system32\slmgr.vbs /ato

Start in:

c:\windows\system32

NOTE: This task will only work if the machine is connected to the internet during the State Restore phase. If this task fails because the network connectivity is not fully initialized, it is possible to manually activate the client through the Computer Properties window.

Now when the client machine is deployed, the task sequence will provide the MAK key during the State Restore phase, and attempt to automatically activate the client machine.

OPTION 3

Use the OverRideProductKey entry in the CustomSettings.ini to specify the MAK key to be injected. This will add the MAK product key only into the x86_Microsoft-Windows-Shell-Setup_neutral\ProductKey location in the Unattend.xml.

From the MDT Toolkit Reference document:

OverrideProductKey

The Multiple Activation Key (MAK) string to be applied after the target operating is deployed to the target computer. The value specified in this property is used by the ZTILicensing.wsf script during the State Restore Phase to apply the MAK to the target operating system. The script also configures the volume licensing image to use MAK activation instead of Key Management Service (KMS). The operating system needs to be activated with Microsoft after the MAK is applied. This is used when the target computer is unable to access a server that is running KMS.

Value

Description

MAK

The MAK string to be provided to the target operating system.

Example

[Settings]

Priority=Default

[Default]

ProductKey=AAAAA-BBBBB-CCCCC-DDDDD-EEEEE-FFFFF

OverrideProductKey=AAAAA-BBBBB-CCCCC-DDDDD-EEEEE-FFFFF

Option 4

During deployment, it is possible to specify the Product Key while running the deployment of the workstation. The Deployment Wizard includes an option to prompt for the Product Key using the "SkipProductKey" entry in the CustomSettings.ini file for the Deployment Point. By specifying an entry of "SkipProductKey=No" the user will be prompted to enter a key while running the deployment of the machine, and if they enter their MAK key there, they deployment will complete successfully.

From the MDT Toolkit Reference document:

SkipProductKey

Indicates whether the Specify the product key needed to install this operating system wizard page is skipped.

For other properties that must be configured when this property is set to YES, see the section “Providing Properties for Skipped Windows Deployment Wizard Pages” later in this reference.

Value

Description

YES

Wizard page is not displayed, and the information on that page is not collected.

NO

Wizard page is displayed, and the information on that page is collected. This is the default value.


Example

[Settings]

Priority=Default

[Default]

SkipWizard=NO

SkipCapture=NO

SkipAdminPassword=YES

SkipApplications=NO

SkipAppsOnUpgrade=NO

SkipComputerBackup=NO

SkipDomainMembership=NO

SkipDeploymentType=NO

SkipUserData=NO

SkipPackageDisplay=NO

SkipLocaleSelection=NO

SkipProductKey=YES

Caution This property value must be specified in upper case so that it can be properly read by the deployment scripts.

UPDATE:

If you are working with MDT 2010 Beta 1 then the issue and resolutions referred to above are valid – however our other most esteemed colleague and MDT creator Michael Niehaus has pointed out that the issue has been fixed for MDT 2010 Beta 2.  Now the screen will have another option to match the options that are available in the client-side Deployment Wizard:
clip_image002[1]

Resources

For more information on the using the SLMGR.VBS script for activation tasks, see the Volume Activation 2.0 Deployment Guide.

For more information on the ProductKey setting, see the Unattended Windows Setup Reference.

This post was contributed by Richard Smith a senior consultant with Microsoft Services UK on behalf of Doug Klokow a senior consultant with Microsoft Services US

  • I'm setting up Windows 7 Enterprise RTM for our internal use and the MDT 2010 RC but when I enter the MAK code the wizard replies that the key is invalid.  Would this work around above fix this until the MDT 2010 RTM is released?

  • I'm setting up Windows 7 Enterprise RTM for our internal use and the MDT 2010 RC but when I enter the MAK code the wizard replies that the key is invalid.  Would this work around above fix this until the MDT 2010 RTM is released?

  • I'm deploying the Windows 7 Enterprise RTM for our internal support company using the MDT 2010 RC and the MAK code we have isn't recognised by the RC wizard so I was wondering if the above workaround would also work in this scenario until the MDT 2010 RTM is released?

  • I'm deploying win 7 via microsofts own 'step-by-step' instructions for unattend.xml on Technet and I get the same error as above. What would be causing it, is it the key. I think it is a volume licensing key....

  • Can I substitute my MAK key for a KMS key?  We are switching over to a KMS server and I need to update my task sequence.

    Thanks,

  • Nicely done! Works great with the task sequence!

  • Very good article.  For anyone deploying Windows Thin PC, you will need to use an MAK key if you are using a write filter (FBWF or EWF) and you will need to make sure Windows is activated prior to enabling the write filter.  For Windows Thin PC, you will also need to make sure this Hotfix is installed (www.microsoft.com/.../details.aspx) or you will get an error if using a Sysprepped image.

  • Using the AMAZING understanding and programming prowess of "Agnoheim" I have adapted a batch script using a FOR loop to gather the Product Key from the bios using his tool and store it as a variable, then by utilizing SLMGR, install that product key and then activate Windows 8. This should work on all computers that are certified for Windows 8. If it is not, the product key value will return blank and make the rest of the script invalid. @ECHO OFF REM We will retrieve the product key from the bios (If it exists) and store it as a variable for /F "tokens=* delims=" %%i in ('rpkfb.exe') do set PRODUCTKEY=%%i @ECHO Your Product Key is %PRODUCTKEY% @ECHO: REM We will take the product key and install it using "Software License Manager" aka (SLMGR) cscript //B "%SYSTEMROOT%\system32\slmgr.vbs" -ipk %PRODUCTKEY% @ECHO: REM We will now take the newly installed product key and activate Windows 8 cscript //B "%SYSTEMROOT%\system32\slmgr.vbs" -ato Script stops here There are a multiple ways to adapt this ***RULES OF THUMB!!!*** Install / Deploy Windows 8 with the Default Product Key (Trial) and activate after install Keep in mind, There are no hacks associated with this! Lets continue... ***END RULES OF THUMB*** I have taken the liberty to compile the self extracting executable using SFX Maker that will utilize the code above in a automated fashion and nothing else. https://drive.google.com/file/d/0Byc1kjBl5mjARzZYZ1hfMlFabmc/edit?usp=sharing God Bless guys!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment