Showing posts with label MDT 2012 Update 1. Show all posts
Showing posts with label MDT 2012 Update 1. Show all posts

Monday, 18 November 2013

Creating a Catalog from a custom x86 WIM file



If you create a custom WIM file with software pre-installed, Windows updates applied or any other modification you want to roll out to make your life easier you will find that the WIM file does not come with a .clg file. This is not normally a problem however if you are using MDT to deploy this image you may need to edit the unattended.xml file, this is done from the OS Info tab within the task sequence editor which will launch the Windows SIM tool, this will allow you to make your changes and save the file.

If you have no .clg file WSIM will attempt to create one for you, brilliant you think, until you get a nice red error line telling you that you cannot create an x86 catalog file on an x64 system. All server operating systems are now coming in x64 now so how do you get around it?

Well the answer is simple if annoying. You install an x86 operating system, install the relevant parts of the ADK and generate your catalog, then you place this file in the Deploymentshare folder with the WIM you are working with and away you go.

Pre-requisites

1. x86 Installation of Windows
2. Windows ADK
3. Custom WIM file


Launch the adksetup.exe file

Install to the default location, click Next

Decline joining the CEIP, click Next

Accept the license agreement

You will only need to select the Deployment tools and .Net Framework 4.0, click Install

When complete click close, we do not need to view the getting started guide.

Open the WSIM from Start > All Programs > Windows Kits > Windows ADK > Windows System Image Manager

Right click on the ‘Select a Windows image or catalog file’ text and choose, ‘Select Windows Image’

Browse to the location of your WIM file and click Open

As there is no .clg file available you will get the following message, click Yes to begin generating a catalog file.

The WSIM will mount the WIM file

And then examine it to generate the catalog

When finished you will have Components and Packages in the Windows Image box within WSIM. This means we are done.

Browse to the location of your WIM file and you should find a .clg file alongside your WIM If you have this file then you can close WSIM


If you loaded the WIM file directly from your Deployment share then you can return to the MDT workbench and change to the OS Info tab within your task sequence and you will find that WSIM will load and allow you to make your changes exactly the same as you could with an x64 WIM, if you created the .clg file from a copy of the WIM file then you will need to copy the .clg into the deployment share into the same folder that the WIM file is in.

Monday, 25 February 2013

MDT Naming Trick - Show Machine's Existing Name

MDT Pre-Populate Name Trick

You ever had it when a machine needs to be rebuilt because it's either crashed completely or is suffering issues that you know, deep down in your technical heart, a rebuild will sort it all out.

So what do you do?

You press that magical network boot key, PXE boot that machine and start the MDT process.  Fantastic, you the go through the wizards to eventually get to the "Computer Name" stage where it then prepopulates the name with a MiniNT name and you go.. hmm.. bugger what the name of the machine again?

You look for a sticker, which has obviously fallen off or worn away, you think i'll need to reboot to get to the login screen to find the name there.. which isn't an option if the machine is totally broke.

Wouldn't it be nice to have the machine put in its actual, existing name in place of that MiniNT name, still editable if required, but there for a reference at least.  Well you can, using some minor trickery and awesomeness.

Thanks to Michael Klinteberg from Technet forums, a simple script copied into the Scripts folder in your deploymentshare and two lines added to your customsettings.ini file will give you the desired effect.

Copy the below script into notepad and save it as "UserExit.vbs"





Function UserExit(sType, sWhen, sDetail, bSkip)
 oLogging.CreateEntry "entered UserExit ", LogTypeInfo
 UserExit = Success
End Function

Function GetOfflineComputername()
On Error Goto 0

 If oEnvironment.Item("OSVERSION")="WinPE" Then
  Dim CompName : CompName = ""
  Dim ret, sOldSystem : sOldSystem = ""
  For Each drv In Array("C", "D", "E", "F")
   If ofso.FileExists(drv & ":\windows\system32\config\system") Then
    sOldSystem = drv & ":\windows\system32\config\system"
    Exit For
   End If
  Next
  oLogging.CreateEntry "Mounting Offline registry " & sOldSystem, LogTypeInfo
  ret = oShell.Run ("reg load HKLM\z " & sOldSystem, 0, True)
  If ret = 0 Then
   CompName = oShell.RegRead("HKLM\z\ControlSet001\Services\Tcpip\Parameters\Hostname")
   If CompName <> "" Then
    oLogging.CreateEntry "Found old computername '" & CompName & "'", LogTypeInfo
   Else
    oLogging.CreateEntry "Old computername name could not be found", LogTypeWarning
   End If
  Else
   oLogging.CreateEntry "Could not mount offline registry " & sOldSystem, LogTypeWarning
  End If
  oShell.Run "REG UNLOAD HKLM\Z", 0, True  
 Else
  CompName = oShell.ExpandEnvironmentStrings("%Computername%")
 End If

 GetOfflineComputername = CStr(CompName)
  
End Function


Monday, 20 August 2012

Windows 8 ADK (The new WAIK)

Yes folks, Microsoft have updated their tools for working with windows images.

What was once known as the Windows Automated Installation Kit has now been merged with more utils and is now called the Assesment and Deployment Kit.

A quick look on Microsofts site only seems to proveide a bootloader to install from the internet however if you run this file you are presented with the option to download the files for offline installation.

Be warned though its a biggie coming in at around 3 and a bit Gig.

It can be downloaded from here