Automated Download and Installation for the Windows Assessment and Deployment Kit (ADK)

Since I am going install the ADK on several clients and servers, I decided to automate that process based on the information found in the MSDN article Installing the Windows ADK

Because downloading all the ADK sources from the Microsoft web can take a while, the first task is to only download them and save the locally.

  1. Create a folder on your local drive, let’s say C:\DATA\ADKSETUP
  2. Then download the ADKSETUP.EXE from the Microsoft download page here and store it into C:\DATA\ADKSETUP (Note that this link will change once the RTM version is released).
  3. Create a batch file called ADK_Download.cmd that has the following content:

    @ ECHO OFF
    cd %~dp0 
    adksetup.exe /quiet /installpath %~dp0  /layout %~dp0
    Pause

  4. Then launch the script with elevated rights and wait for the download to complete.

image

When the ADK setup tool has downloaded all sources, you will find a new folder called Installers and a file called UserExperienceManifest. According to my findings, when the UserExperienceManifest file exists, the ADKSetup.exe assumes that the sources are downloaded and available in the Installers folder. To see the difference in behavior launch ADKSETUP.EXE with and without the file being present.

Now that we have the installation sources stored locally we can install the ADK on any client or server offline. ADKSETUP.EXE provides several installation options that are explained in detail here (go to section ADKSetup.exe Command-Line Syntax) or just launch ADKSEUP.EXE /?

For installing all features included in the ADK do the following:

  • Create a batch file called adk_install.cmd and add the following content:

    @ ECHO OFF
    cd %~dp0 
    adksetup.exe /promptrestart /ceip on /quiet /installpath "c:\program files (x86)\Windows Kits\8.0" /features +

If you only want to install one or more specific features, then only specify those after the /features option.

  • Create a batch file called adk_install_winpe.cmd and add the following content:

    @ ECHO OFF
    cd %~dp0 
    adksetup.exe /promptrestart /ceip on /quiet /installpath "c:\program files (x86)\Windows Kits\8.0" /features OptionId.WindowsPreinstallationEnvironment

For a complete list of all available features run ADKSETUP.EXE /LIST

   OptionId.ApplicationCompatibilityToolkit

   OptionId.DeploymentTools

   OptionId.WindowsPreinstallationEnvironment

   OptionId.UserStateMigrationTool

   OptionId.VolumeActivationManagementTool

   OptionId.WindowsPerformanceToolkit

   OptionId.WindowsAssessmentToolkit

   OptionId.WindowsAssessmentServicesClient

   OptionId.SqlExpress2012

 

Well and of course what gets installed sometimes must be removed, so to uninstall the ADK just run the following command:

adksetup.exe /promptrestart /ceip on /quiet /uninstall

Have a great day.

How to register a custom Assessment Job within the Windows Assessment Console

In the Scaling And Extending Windows Assessments To Improve System Quality (Part I & II) presentation shown at the //BUILD conference in September Jason Cohen a Senior Software Development Engineer at Microsoft demonstrated how to create a custom Assessment job using a Ping test as example.

Excited about the idea of extending the Windows Assessment Console with self-defined tests, I have since spend quite some time reading the related documentation on MSDN. I can imagine that one day I would be able to automate a large amount of system validation and certification tests that nowadays are performed manually or with individual scripts can be fully integrated into the Assessment Console that not only takes care of the automation but also provides a nice reporting interface.

When you have the ADK installed,. you find all of the pre-defined Assessments stored under the folder C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit.

  • Content based Assessments
  • Energy
  • Memory Assessments
  • Windows Core Assessments

When opening one of these *.asmtx files you will notice that the files have an XML Syntax, a complete overview can be found in the AXE Schema Reference on MSDN However I guess at very first moment the average Tech guy (like me) will be overwhelmed by the vast number of Elements that can be used for the Assessment, Job and Result manifests.

I initially tried to reverse engineer some things, but had poor results and unfortunately there aren’t any examples posted on MSDN yet, so I decided to drop Jason an e-mail if he could pass on the Ping Test example he had used for demonstration purposes in his Demo. A few days later he  kindly responded and send me the Ping-Test files. I was then able to register it within the Assessment Console and it also provided me with a basis to create my first own assessment called Folder-Test which isn’t perfectly complete, but gives an idea of what can be done further.

Now let me guide you through the process of registering a custom Assessment job.

  1. Download the samples I have stored here
  2. Create a folder called CustomAssessments under C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit\ and copy all the files provided in the samples ZIP file into this folder.
  3. Then to register the Ping Test Assessment and the Folder Test Assessment run the following commands

    C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit\x86\regasmt.exe “C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit\CustomAssessments\pingtest.asmtx”

    C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit\x86\regasmt.exe “C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Assessment Toolkit\CustomAssessments\foldertest.asmtx”

    What regasmt.exe does is creating a new entry under:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Assessments\Installed

  4. When now opening the Assessment Console you will find the new custom PING Assessment Jobs listed under the “Run Individual Assessment” Node.
    image

    The same for the Folder Test

    image

    Note that when running regasmt it validates the manifest file and if there are errors the registration fails, also if later you edit/update the manifest file, even if it is registered already, when there are syntax issues, the assessment will not be shown in the Assessment console.

  5. Now that the Assessments are registered we can execute them directly from the assessment console or package them to be executed on another system.

    image

I hope I could spread some inspiration on what can be done with the Assessment Console. Many thanks to Jason for sharing his example with me.

Performing a Windows Performance Assessment with the Windows ADK

By now most of you have probably looked at the Windows 8 client or server preview build and unfortunately the most attention is given to the new Metro look, but hey there’s more than that coming, in fact there’s some awesome stuff coming I’d like you to know about. With Windows Vista and Windows 7 Microsoft also released the Windows Automated Installation Kit known as WAIK. For Windows 8 this is now being rebranded into Windows Assessment and Deployment Kit in short ADK. Now don’t get confused by the word Assessment here as it has nothing to do with the Microsoft Assessment and Planning Toolkit (MAP) that is used to assess your current infrastructure.

The Windows 8 Assessment and Deployment kit is targeted at OEM’s and IT professionals to evaluate overall system performance and for the windows deployment automation. I’ll probably talk about some of the tools included in here later, but for today I’d like to focus on the Windows Performance Assessment that is included within the Windows Assessment solution.

Those of you who have done Windows Performance analysis before probably know xperf.exe or xbootmgr.exe and its huge number of different command line options for all sorts of things, and once you’ve done your trace reviewing the results is another challenge. If you know what I’m talking about here, then I’m sure you’re going to be a big fan of ADK and the Windows Assessment Console.  I’m still in excitement mode, but this is just awesome!

Once you have installed the ADK (at present only available for MSDN subscribers) and have selected the Windows Assessment feature during installation, you’ll get the Windows Assessment installed. Now let me show you how easy it is now to prepare, run and review a Windows Performance analysis.

First select the Windows 7 Performance Job and the click on the “Configure” button

2011-11-25 00h21_32

A second tab is opened where the details of the Job are displayed. As you can see the Windows 7 Performance analysis consists of several assessments that can be further configured, but for now we’ll leave everything default. Since we want to run the performance assessment on another machine click on the “Package” button.

2011-11-25 00h23_44

Specify the Results path

2011-11-25 00h28_01

and where the package content is to be stored.

2011-11-25 00h28_41

Then copy the content to a USB disk or directly over to the machine’s local disk that will be used to run the assessment. Because during the assessment the system will reboot several times it’s recommended to enable auto logon on the client. if you don’t want to enable that manually via the registry, use the Sysinternals Autologon utility to enable (and later disable) autologon. To start the performance assessment just start the “Run Job.cmd” that is stored within the root of the assessment package folder. Note that by default this job can take up to 3 hours to run. (if you customize the job you can reduce the number of passes etc.).

2011-11-24 19h43_48

after a while………..the Windows Assessment Console will open on the client and you can start reviewing the results.

2011-11-24 23h41_08

2011-11-24 23h45_11

There is more, much more we can do with the Assessment Console, but let’s leave that for another time.

More Information

Introduction to the Windows Assessment and Deployment Kit
Packaging assessments for use on a second computer
Introduction to the Boot Performance Assessment