Oct 11

ConfigMgr 2007, Updating a Windows 7 Image with the latest Software Updates – A less conventional, but very effective way

Inspired by a previous post about the option to Schedule Updates for an already existing Operating System Image in ConfigMgr vNext, I created a little batch-file to do something similar without the GUI of ConfigMgr vNext. Of course, I do know that the ‘best practice’ for ConfigMgr 2007 is to just run another Build and Capture Task Sequence, but in some cases this can come in handy. One thing is for sure, this updates a Windows 7 Image within fifteen minutes.

Background Story

Now lets start with a little background story, to explain why in some situations there might be the need for this batch-file. Every month there are new Software Updates released by Microsoft. During the Software Updates Deployment the, for the organization needed, updates get selected and downloaded to the Software Update Package. In other words, the, for the organization needed, updates are already downloaded and available. To update the existing image with the newest updates, the ‘best practice’ is to deploy the newest updates and run another Build and Capture Task Sequence. Sometimes, especially at smaller companies, this is considered as a lot of extra work/ effort and because of that, it is often forgotten. Even though an up-to-date Windows 7 Image deploys a lot faster then a Windows 7 Image that still has to install a lot of Software Updates. So to help out the people that are just to busy (you can actually fill in anything you want, I just like to think that they are to busy), I created this batch-file that will do everything.PckgSrcLctn

Input Locations

Well… after this all being said, lets take a look at the two most important inputs that we need for this batch-file:

  1. The current setup of the batch-file assumes that there is a  Software Updates Package for all Windows 7 (x86 and x64) updates. The Package source of this package is used as input for this batch-file. This location can be found in the Properties of the Software Updates Package (see the first picture) in the ConfigMgr Console. By doing this, it is not needed to re-download the Software Updates, it’s only needed to gather the Software Updates together from all the subdirectories.
  2. Another important input for the batch-file is the location of the Windows 7 Image, which has to be updated. For this the Image path can be used, which can be found in the Properties of the Operating System Image (see the second picture) in the ConfigMgr Console. Don’t forget that it is still needed to update the Distribution Point(s) after the batch-file has run!

Batch-fileImgPth

As we know now a little background story and we know where the most important parts of the input comes from, lets take a look at the batch-file that will make it happen.

REM =========================================
REM ARGUMENT -1- TempPartition = %1
REM ARGUMENT -2- UpdatesPackageSource = %2
REM ARGUMENT -3- Architecture = %3
REM ARGUMENT -4- WimFileAndLocation = %4
REM ARGUMENT -5- FromDate MM-DD-YYYY = %5
REM ===================================================

REM ===================================================
REM Make (temporary) directories for updates and mounting
REM ===================================================

MD %1\TEMP\Mount
MD %1\TEMP\Updates

REM ======================================================
REM Copy new updates of %3 -architecture and of > %5 -date to temporary directory
REM ======================================================

FOR /R %2 %%P IN (*%3.cab) DO (
XCOPY "%%P" %1\TEMP\Updates /H /C /Y /D:%5
)

REM ======================================================
REM Mount image, add updates, commit and unmount
REM ======================================================

DISM /Mount-Wim /WimFile:%4 /Index:1 /MountDir:%1\TEMP\Mount /LogPath:%1\DISM.Log
DISM /Image:%1\TEMP\Mount /Add-Package /PackagePath:%1\TEMP\Updates /LogPath:%1\DISM.log
DISM /Unmount-Wim /MountDir:%1\TEMP\Mount /Commit /LogPath:%1\DISM.log

REM ======================================================
REM Remove (temporary) directories again
REM ======================================================

RD %1\TEMP /S /Q

The biggest part will explain itself, with or without the comments, but it also shows here that I am using five variables. This is to make it easier adjustable for different Windows 7 Images, Package source location, architectures and dates. These variables are used in the following way:

  1. %1 – Presents the volume that can be used to store the temporary folders.
  2. %2 – Presents the full location of the Software Updates Package source.
  3. %3 – Presents the architecture of the Operating System.
  4. %4 – Presents the full location of the Operating System Image, including the name of it.
  5. %5 – Presents the date of the oldest Software Updates that have to be added (Format: MM-DD-YYYY).

Now lets end this post with how to run this batch-file:
[NameOfBatchFile].BAT [DriveLetter:] [SoftwareUpdatesPackageSourceLocation] [Architecture] [WIMLocation\WIMName] [DateLatestNeededUpdates]

Share
Jan 18

User Driven OS Deployment with “Modena”

It took a while but this weekend it was finally time for some testing of, what’s code-named, “Modena”. Modena is a tool, developed by Microsoft IT, that enables the ability of an End-User Experience by using a powerful OSD Wizard.

ModWelcWhen you are searching for a way to get your users “involved” in an OS Deployment, then I would recommend you to take a look at Modena. The OSD Wizard of Modena (see picture) can be changed in a lot of different way’s. As an administrator you can select which settings can be done by a user and which are pre-set. By these customizable settings you can think about things like computername, domain, local administrators, language, time, image, backup (via USMT 4.0) and the applications. The nice thing about the applications is that you can first do a scan of the computer to see what applications are currently installed. Based on the results of this scan, applications can get pre-selected (or not). Besides al of these settings Modena also provides a better insight in what is happening with the computer during the Task Sequence.

To make a long story short, take a look at Microsoft Connect to get Modena: 
>> https://connect.microsoft.com/site868 <<

Also take a look at the following links for setting up Modena…
1. Getting started with Modena – Step 1 – Installing Modena: http://blogs.technet.com/osd/archive/2009/12/15/getting-started-with-modena-step-1-installing-modena-rc2.aspx
2. Getting started with Modena – Step 2 – Create OSD Packages: http://blogs.technet.com/osd/archive/2009/12/16/getting-started-with-modena-step-2-create-osd-packages.aspx
3. Getting started with Modena – Step 3 – Importing Task Sequences: http://blogs.technet.com/osd/archive/2009/12/17/getting-started-with-modena-step-3-importing-task-sequence.aspx
4. Getting started with Modena – Step 4 –Introduction to OSD Designer: http://blogs.technet.com/osd/archive/2009/12/17/getting-started-with-modena-step-4-introduction-to-osd-designer.aspx
5. Getting started with Modena – Step 5 – Using Modena Online Services: http://blogs.technet.com/osd/archive/2009/12/18/getting-started-with-modena-step-5-using-modena-online-services.aspx
6. Getting started with Modena – Step 6 – Setting Up Applications: http://blogs.technet.com/osd/archive/2009/12/28/getting-started-with-modena-step-6-setting-up-applications.aspx

…and take a look at these links for the story behind Modena.
General Cravings of OSD: http://blogs.technet.com/osd/
Windows 7 Deployment Guide: http://technet.microsoft.com/en-us/magazine/ee676738.aspx

Share
Nov 09

Error trying to open the ConfigMgr Console

Last week I had some problems with opening the ConfigMgr Console. The weird part was that the error only appeared for one user. This was the error I got: MMC cannot open the file <driver>:\Program Files (x86)\Microsoft Configuration Manager\AdminUI\bin\adminconsole.msc. This may be because the file does not excist, is not an MMC console, or was created by a later version of MMC. This may also be because you do not have sufficient rights to the file.

Then I figured that, because the ConfigMgr Console is a MMC snap-in, it creates a version in the user profile. Because I use Windows 7 and Windows Server 2008 R2 it is located at: <Drive>:\Users\<Username>\AppData\Roaming\Microsoft\MMC\adminconsole.msc.

So after deleting the version from the profile and restarting the ConfigMgr Console it all worked like a charm.

Share