09 December 2011

Deploying Windows XP with MDT 2010/2012

Overview
Deploying Windows XP with MDT is tricky. The typical creating a golden image and then linking the golden image to the final image is not a straight forward, automated process. In order to accomplish this, there are manual steps necessary. The XP setup files cannot be directly used because the drivers are not properly injected into the image when it is laid down on the machine. there are two ways to accomplish this: 1) install XP  and then sysprep it with the drivers being copied down in the sysprep process and then manually create a WIM file, or 2) use nlite to inject the drivers into the XP setup and then use MDT to deploy the OS in order to create a golden image. i have not tried the nlite option as of yet, but in theory, it should work.

Updates
You cannot inject updates into Windows XP using MDT because MDT only accepts msu files, which were not around for XP. XP only uses exe files for the updates. The best way to integrate updates in XP is through nlite, otherwise let the updates get installed in the base build process using the ZTIWindowsUpdate.wsf. This does download the correct updates. Also, you can disable the Apply Patches task, as it will not be functional in XP. NOTE: If you do decide to slipstream the updates using nlite, make sure you install XP and manually run the windows updates first so that you can get the exact sequence that they need to be installed. If you do not do this, then the image will most definitely corrupt. I also recommend slipstreaming them in 1/4 increments because they still might corrupt the OS and it's then much harder to trace down what update caused the corruption.

Drivers
I could not get the drivers to inject correctly through MDT. My solution was to inject all of the drivers for the machine models that we are installing XP on. I then disabled the Inject Drivers tasks in both the pre and post image processes.


Base Build Image
The only way I was able to get an image of the base build was to run the Base Build task sequence through it's entirety without creating a WIM. At that point, I sysprepped the OS and then ran the WinPe process I manually created to capture the image. I injected the necessary files and features into the WinPE so that imagex could be automatically be executed upon the WinPE OS loading. I then created a basic task sequence and linked the base build image to it and sequenced all of the applications needed for post-install.

15 November 2011

Switch from Cellular Phone Service to VoIP

Background:
I had been an AT&T Wireless (formerly Cingular) customer for 12 years before the idea came to me, via a colleague, to use VoIP through wireless hotspot, instead of cellular phone service. March 2011, I purchased a Verizon Samsung 4G LTE SCH-LC11 MiFi and then subscribed to Verizon's monthly plan without a contract. For the VoIP, I went with the Line2 app. So to make it a true VoIP, I put my iPhone into airplane mode with the WiFi enabled.

Update (31 January 2012):
I recently decided to reactivate my iPhone as a backup in case the MiFi dies on me. I got the AT&T $2/day plan that only bills me if I use any data or cellular. I keep my phone in airplane mode at all times with WiFi activated so I do not accidentally use it. I went onto eBay and purchased a GoPhone SIM for $2.65. Once I received the SIM, I first activated it on AT&T's site. NOTE: AT&T does not allow GoPhone service for the iPhone. I had to use the IMEI number off of my old i410 phone to activate the SIM. I then inserted the card and received the invalid SIM card error. I did a master reset on the iPhone and the SIM was then accepted. I went ahead and did both a data and cellular test. Both checked out. Now, I have a cellular backup to my MiFi plan, without the need of a monthly plan.

Results:
At first, it was touchy. Line2 was not quite developed completely. It was constantly kicking me off of VoIP back into cellular every time my MiFi would switch between 3G and 4G. Within 4 months though, they had a revolutionary update to the Line2 app that solved all of those issues. It was at that point, I cancelled my cellular plan with AT&T and went straight VoIP. I have not regretted it. Line2 offers unlimited calls and text messages nationwide for $9.95 a month. The other advantage I had with this was that my MiFi also provides data to my iPad. So it has also cut down on the cost there.

Advantages:

  1. Unlimited phone calls and text messages
  2. Voicemails can not only be listened to on the phone, but can also be automatically emailed to you
  3. MiFi provides data to both the iPhone and iPad, thereby requiring only one plan to pay for instead of two
  4. Significant overall savings
  5. I have CDMA with my MiFi and GSM with my iPhone, so if the CDMA is out of range, I can possibly still have service with the GSM through AT&T.
  6. If you are in a remote location where high speed internet is available, such as cabins in East Tennessee, but there is no cell service, you still have VoIP
  7. As happened to me one time, if your iPhone dies and you have your iPad with you, then you still have VoIP service. If the MiFi dies, I still have the GoPhone service as a third option.


Disadvantages:

  1. You will always have to carry a second device with you, specifically, the MiFi
  2. Line2 does not yet have MMS texting capabilities, but they are close to releasing the next upgrade that will have this function
  3. If you are using an iPhone, the Line2 app does automatically check the cellular first, even if the phone is in airplane mode and you have cellular disabled in the app, which does slow it down some when first launching the app, but once it has connected through VoIP, it is perfect. This does not happen on the iPad or an iPod
  4. Line2 does not have customizable ringtones
  5. 4G MiFi devices eat the batteries up FAST, especially if you are using a lot of data
  6. I have been in one business that blocked WiFi connections and therefor my iPhone could not connect with the MiFi
  7. Line2 does not have short SMS capabilities, but it is in the future plans
NOTE: I am not putting this as a disadvantage as I will explain. You do not have the reduced prices of the cellular phones meaning that you will pay the full retail price of the phone when you have to buy a new one. That still is much cheaper than the supposed discount you get from the cellular provider. Over the life of the contract, the carrier makes a lot more off of you than you got discounted on the phone. You can compare it to financing. It's just that you have to put the money up front instead of extending payments over the life of the contract.

Price Breakdown:

This is the plan I had with AT&T compared to what I now have with Line2 and Verizon:

AT&T PlanPriceVerizon/Line2 PlanPrice
Nation 450 with Rollover Minutes$39.99Line2 Calling Plan with
Unlimited Calling
$9.95
DataPro 4 GB for Smartphones$45.00Verizon 4G 5gb Data Plan$50.00
Messaging Unlimited$20.00included$0.00
Enhanced Voice Mail$1.99included$0.00
iPhone Insurance$9.99GoCare iPhone Insurance$4.92
iPad Plan$25.00included$0.00
AT&T Total$141.97Verizon/Line2 Total$64.87
54.3% Monthly Savings


This is the equivalent option available by AT&T that matches the features provided by Line2 and Verizon:

AT&T PlanPriceVerizon/Line2 PlanPrice
Nation Unlimited$69.99Line2 Calling Plan with
Unlimited Calling
$9.95
DataPro 4 GB for Smartphones$45.00Verizon 4G 5gb Data Plan$50.00
Messaging Unlimited$20.00included$0.00
Enhanced Voice Mail$1.99included$0.00
iPhone Insurance$9.99GoCare iPhone Insurance$4.92
iPad Plan$25.00included$0.00
AT&T Total$171.97Verizon/Line2 Total$64.87
62.3% Monthly Savings


Conclusion:
The Line2 app is very easy to use. It functions just like any built-in cellular app does. There is nothing special you have to do to set it up. The biggest thing to me has been the cost savings. It cut my monthly bill by more than 50%. I rarely talked on the phone, the 250 minute plan was a thing of the past, unless you are a senior citizen, so I usually had thousands of minutes of carry over time each year with AT&T. I personally prefer texting. The advantages, in my opinion, far outweigh the disadvantages. I really like the fact of knowing that I have two VoIP devices, iPhone and iPad, in case one dies on me, plus there is the GoPhone cellular service on the iPhone that provides a third means of communications. The Line2 iPad app they recently released is a very slick app. I know a lot of people have asked how I can stand carrying two devices all of the time. It is easy. I have a belt pouch for my MiFi and then my pant pocket for the iPhone. I also carry my iPad quite a bit of the time. 

12 November 2011

Configuring BIOS Settings during the SCCM/MDT Imaging Process

You want to set the BIOS settings during an imaging process, but you can't get it correctly sequenced into the task sequencing. The BIOS can be set in the task sequencing process, but it can only function correctly after the image has been laid down; post-image process or later. This causes an issue for such tasks as setting the SATA mode to either AHCI or ATA. Once the image has been laid down, these cannot be set, otherwise the OS will blue screen upon reboot. In order to work around this, the boot WIM file, which loads the initial MDT screen, needs to be modified to include the Dell CCTK, inject HAPI drivers, and modify the unattend.xml file. The Dell CCTK is a command line utility that will set the BIOS settings. The HAPI drivers provide the hooks required by the CCTK to function properly. Finally, the unattend.xml file needs to be modified in order to load the HAPI drivers into memory and then execute the CCTK, which sets the BIOS settings, before executing the Litetouch.wsh. You can download the script from below.

NOTE: When using the CCTK, it is best to create a master ini data file for CCTK to read from for all of the model PCs you currently have, including both laptops and desktops. It does not matter if you have settings in there that a system does not have. It will skip over the settings that do not exist. The CCTK Options below is documentation provided by Dell of all the available CCTK options to add to your ini file.

NOTE: This has only been used on Dell systems at the firm I work for. We have 35 different models that we manage. I cannot guarantee the CCTK command and drivers will function correctly on any other system, other than a Dell.

Here are links to all of the CCTK BIOS options, multiplatform.ini file, and the script I wrote:



 '*******************************************************************************   
 '      Program: Install.vbs   
 '       Author: Mick Pletcher   
 '         Date:   
 '     Modified:   
 '   
 '      Program:   
 '      Version:   
 '  Description: This will do the following to the MDT/SCCM generated WIM files:   
 '        inject the Dell CCTK, inject the HAPI drivers, and modify the   
 '        unattend.xml file.   
 '
 ' Requirements: Microsoft WAIK, location for the locally stored WinPE files   
 '        (WinPEDIR Global Variable), MDT Server (I have 2 servers   
 '        MDT01 and MDT02), designation of architecture, and Dell CCTK.   
 '        NOTE: This script has been created to automate the update process   
 '        on a Windows 7 64-bit PC, therefor the directory locations of   
 '        the CCTK files will differ for an x86 machine.   
 '*******************************************************************************   
 Option Explicit  
 
 REM Define Constants   
 CONST TempFolder  = "c:\temp\"   
 CONST LogFolderName = "CCTK"   
 CONST MDT01     = "MDT01"   
 CONST MDT02     = "MDT02"   
 CONST WinPEDIR   = "c:\winpe\"   
 CONST x64      = "x64"   
 CONST x86      = "x86"   

 REM Define Global Variables   
 DIM LogFolder   : LogFolder    = TempFolder & LogFolderName & "\"   
 DIM RelativePath : Set RelativePath = Nothing   

 DefineRelativePath()   
 REM Refresh Local WIM Files from MDT Servers   
   DeleteLocalWIMFiles()   
   CopyWIMFiles( MDT01 )   
   RenameWIMFiles( MDT01 )   
   CopyWIMFiles( MDT02 )   
   RenameWIMFiles( MDT02 )   
 REM Process Local x86 file for MDT01   
   MountWIM MDT01,x86   
   AddWMI(x86)   
   CopyHAPIFiles( x86 )   
   CopyCCTKFiles( x86 )   
   EditUnattend( x86 )   
   DismountWIM()   
 REM Process Local x64 File for MDT01   
   MountWIM MDT01,x64   
   AddWMI(x64)   
   CopyHAPIFiles( x64 )   
   CopyCCTKFiles( x64 )   
   EditUnattend( x64 )   
   DismountWIM()   
 REM Process Local x86 File for MDT02   
   MountWIM MDT02,x86   
   AddWMI(x86)   
   CopyHAPIFiles( x86 )   
   CopyCCTKFiles( x86 )   
   EditUnattend( x86 )   
   DismountWIM()   
 REM Process Local x64 File for MDT02   
   MountWIM MDT02,x64   
   AddWMI(x64)   
   CopyHAPIFiles( x64 )   
   CopyCCTKFiles( x64 )   
   EditUnattend( x64 )   
   DismountWIM()   
 Complete()   
 GlobalVariableCleanup()   

 '*******************************************************************************   
 '*******************************************************************************   

 Sub DefineRelativePath()   

   REM Get File Name with full relative path   
   RelativePath = WScript.ScriptFullName   
   REM Remove file name, leaving relative path only   
   RelativePath = Left(RelativePath, InStrRev(RelativePath, "\")) 

 End Sub   

 '*******************************************************************************   

 Sub DeleteLocalWIMFiles()   

   REM Define Local Objects   
   DIM FSO    : Set FSO    = CreateObject("Scripting.FileSystemObject")   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM Parameters : Parameters = "/F /Q"   
   DIM sCMD_1 : sCMD_1 = "%COMSPEC% /c del " & RelativePath & "*MDT01.wim"   
   DIM sCMD_2 : sCMD_2 = "%COMSPEC% /c del " & RelativePath & "*MDT02.wim"   
   DIM sCMD_3 : sCMD_3 = "%COMSPEC% /c del " & RelativePath & "generic*.wim"   

   oShell.Run sCMD_1 & Parameters, 1, True   
   oShell.Run sCMD_2 & Parameters, 1, True   
   oShell.Run sCMD_3 & Parameters, 1, True   

   REM Cleanup Local Variables   
   Set sCMD_1     = Nothing   
   Set sCMD_2     = Nothing   
   Set sCMD_3     = Nothing   
   Set FSO        = Nothing   
   Set oShell     = Nothing   
   Set Parameters = Nothing   

 End Sub   

 '*******************************************************************************   

 Function CopyWIMFiles(Server)   

   REM Define Local Objects   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM Source      : Source      = "\\" & Server & "\DeploymentShare\Boot"   
   DIM Destination : Destination = "c:\winpe"   
   DIM Parameters  : Parameters  = "*.wim /eta /r:1 /w:0"   
   DIM Command01   : Command01   = "robocopy" & Chr(32) & Source & Chr(32) & Destination & Chr(32) & Parameters   

   oShell.Run Command01, 1, True  
 
   REM Cleanup Local Variables   
   Set Command01   = Nothing   
   Set Destination = Nothing   
   Set oShell      = Nothing   
   Set Parameters  = Nothing   
   Set Source      = Nothing   

 End Function   

 '*******************************************************************************   

 Function RenameWIMFiles(Server)   

   REM Define Local Objects   
   DIM FSO  : Set FSO  = CreateObject("Scripting.FileSystemObject")   

   REM Define Local Variables   
   DIM Source_x86 : Source_x86 = RelativePath & "LiteTouchPE_x86.wim"   
   DIM Source_x64 : Source_x64 = RelativePath & "LiteTouchPE_x64.wim"   
   DIM Dest_x86  : Dest_x86  = RelativePath & "LiteTouchPE_x86_" & Server & ".wim"   
   DIM Dest_x64  : Dest_x64  = RelativePath & "LiteTouchPE_x64_" & Server & ".wim"   

   If FSO.FileExists(Source_x86) then   
     If NOT FSO.FileExists(Dest_x86) then   
       FSO.MoveFile Source_x86, Dest_x86   
     End If   
   End If   
   If FSO.FileExists(Source_x64) then   
     If NOT FSO.FileExists(Dest_x64) then   
       FSO.MoveFile Source_x64, Dest_x64   
     End If   
   End If   

   REM Cleanup Local Variables   
   Set Dest_x86   = Nothing   
   Set Dest_x64   = Nothing   
   Set FSO        = Nothing   
   Set Source_x86 = Nothing   
   Set Source_x64 = Nothing   

 End Function   

 '*******************************************************************************   

 Function MountWIM(Server,Architecture)   

   REM Define Local Objects   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM MountDIR  : MountDIR  = RelativePath & "Mount"   
   DIM WIMFile   : WIMFile  = RelativePath & "LiteTouchPE_" & Architecture & "_" & Server & ".wim"   
   DIM Command01 : Command01 = "DISM /Mount-Wim /WIMFile:" & WIMFile & Chr(32) & "/Index:1 /MountDIR:" & MountDIR
   
   oShell.Run Command01, 1, True   

   REM Cleanup Local Variables   
   Set Command01 = Nothing   
   Set MountDIR  = Nothing   
   Set oShell    = Nothing   
   Set WIMFile   = Nothing 
  
 End Function   

 '*******************************************************************************   

 Sub AddWMI(Architecture)   

   REM Define Local Objects   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM Image           : Image       = "/Image:" & RelativePath & "Mount"   
   DIM AddPackage      : AddPackage   = "/Add-Package"   
   DIM PackagePath     : Set PackagePath = Nothing   
   DIM PackagePath_x86 : PackagePath_x86 = "/PackagePath:" & Chr(34) &_   
                       "C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab" & Chr(34)   
   DIM PackagePath_x64 : PackagePath_x64 = "/PackagePath:" & Chr(34) &_   
                       "C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-wmi.cab" & Chr(34)   
   DIM Command01       : Set Command01  = Nothing   

   If Architecture = "x86" Then   
     PackagePath = PackagePath_x86   
   Else   
     PackagePath = PackagePath_x64   
   End If   
   Command01 = "DISM" & Chr(32) & Image & Chr(32) & AddPackage & Chr(32) & PackagePath   
   oShell.Run Command01, 1, True   

   REM Cleanup Local Variables   
   Set AddPackage      = Nothing   
   Set Command01       = Nothing   
   Set Image           = Nothing   
   Set oShell          = Nothing   
   Set PackagePath     = Nothing   
   Set PackagePath_x86 = Nothing   
   Set PackagePath_x64 = Nothing   

 End Sub   

 '*******************************************************************************   

 Sub CreateFolderStructure(Architecture)   

   REM Define Local Objects   
   DIM FSO    : Set FSO    = CreateObject("Scripting.FileSystemObject")   
   DIM oShell : Set oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM Command01     : Set Command01 = Nothing   
   DIM Directory     : Set Directory = Nothing   
   DIM Directory_x86 : Directory_x86 = RelativePath & "Mount\CCTK\x86\HAPI"   
   DIM Directory_x64 : Directory_x64 = RelativePath & "Mount\CCTK\x86_64\HAPI"   

   If Architecture = "x86" Then   
     Directory = Directory_x86   
   Else   
     Directory = Directory_x64   
   End If   
   If NOT FSO.FolderExists(Directory) then   
     FSO.CreateFolder(Directory)   
   End If   

   REM Cleanup Local Variables   
   Set Command01     = Nothing   
   Set Directory     = Nothing   
   Set Directory_x86 = Nothing   
   Set Directory_x64 = Nothing   
   Set FSO           = Nothing   
   Set oShell        = Nothing   

 End Sub   

 '*******************************************************************************   

 Sub CopyHAPIFiles(Architecture)   

   REM Define Local Objects   
   DIM FSO    : Set FSO    = CreateObject("Scripting.FileSystemObject")   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM sCMD_1     : Set sCMD_1 = Nothing   
   DIM sCMD_2     : Set sCMD_2 = Nothing   
   DIM Source     : Set Source = Nothing   
   DIM Source_x86 : Source_x86 = "C:\Program Files (x86)\Dell\CCTK\X86\HAPI\*.*"   
   DIM Source_x64 : Source_x64 = "C:\Program Files (x86)\Dell\CCTK\X86_64\HAPI\*.*"   
   DIM Dest       : Set Dest   = Nothing   
   DIM Dest_x86   : Dest_x86   = RelativePath & "mount\CCTK\x86\HAPI"   
   DIM Dest_x64   : Dest_x64   = RelativePath & "mount\CCTK\x86_64\HAPI"   

   If Architecture = "x86" Then   
     Source = Source_x86   
     Dest  = Dest_x86   
   Else   
     Source = Source_x64   
     Dest  = Dest_x64   
   End If   
   sCMD_1 = "%COMSPEC% /c mkdir " & Dest   
   If NOT FSO.FolderExists(Dest) then   
     oShell.Run sCMD_1, 1, True   
   End If   
   sCMD_2 = "%COMSPEC% /c copy " & Chr(34) & Source & Chr(34) & Chr(32) & Dest & Chr(32) & "/V /Y"   
 '  If FSO.FolderExists(Source) then   
     oShell.Run sCMD_2, 1, True   
 '  End If   

   REM Cleanup Local Variables   
   Set Dest       = Nothing   
   Set Dest_x86   = Nothing   
   Set Dest_x64   = Nothing   
   Set FSO        = Nothing   
   Set oShell     = Nothing   
   Set sCMD_1     = Nothing   
   Set sCMD_2     = Nothing   
   Set Source     = Nothing   
   Set Source_x86 = Nothing   
   Set Source_x64 = Nothing 
  
 End Sub   

 '*******************************************************************************   

 Sub CopyCCTKFiles(Architecture)   

   REM Define Local Objects   
   DIM FSO : Set FSO = CreateObject("Scripting.FileSystemObject")   

   REM Define Local Variables   
   DIM CCTKFile   : CCTKFile  = "cctk.exe"   
   DIM MXMLFile   : MXMLFile  = "mxml1.dll"   
   DIM INIFile    : INIFile  = "multiplatform.ini"   
   DIM PCIFile    : PCIFile  = "pci.ids"   
   DIM NetSource  : NetSource = "\\global.gsp\data\clients\na_clients\Dell\BIOS\"   
   DIM Source     : Set Source = Nothing   
   DIM Source_x86 : Source_x86 = "C:\Program Files (x86)\Dell\CCTK\X86\"   
   DIM Source_x64 : Source_x64 = "C:\Program Files (x86)\Dell\CCTK\X86_64\"   
   DIM Dest       : Set Dest  = Nothing   
   DIM Dest_x86   : Dest_x86  = RelativePath & "mount\CCTK\x86\"   
   DIM Dest_x64   : Dest_x64  = RelativePath & "mount\CCTK\x86_64\"   

   If Architecture = "x86" Then   
     Source = Source_x86   
     Dest  = Dest_x86   
   Else   
     Source = Source_x64   
     Dest  = Dest_x64   
   End If   
   If NOT FSO.FolderExists(Dest) then   
     FSO.CreateFolder(Dest)   
   End If   
   If FSO.FolderExists(Source) then   
     FSO.CopyFile Source & CCTKFile, Dest, 1   
   End If   
   If FSO.FolderExists(Source) then   
     FSO.CopyFile NetSource & INIFile, Dest, 1   
   End If   
   If FSO.FolderExists(Source) then   
     FSO.CopyFile Source & PCIFile, Dest, 1   
   End If   
   If FSO.FolderExists(Source) then   
     FSO.CopyFile Source & MXMLFile, Dest, 1   
   End If   

   REM Cleanup Local Variables   
   Set CCTKFile   = Nothing   
   Set INIFile    = Nothing   
   Set MXMLFile   = Nothing   
   Set PCIFile    = Nothing   
   Set Dest       = Nothing   
   Set Dest_x86   = Nothing   
   Set Dest_x64   = Nothing   
   Set FSO        = Nothing   
   Set Source     = Nothing   
   Set Source_x86 = Nothing   
   Set Source_x64 = Nothing   

 End Sub   

 '*******************************************************************************   

 Sub EditUnattend(Architecture)   

 REM Define Local Constants   
 CONST ForReading = 1   
 CONST ForWriting = 2   

 REM Define Local Objects   
 DIM File    : File    = "C:\winpe\mount\unattend.xml"   
 DIM strOld1 : strOld1 = "<Order>1</Order>"   
 DIM strNew1 : strNew1 = "<Order>4</Order>"   
 DIM strOld2 : strOld2 = "<RunSynchronous>"   
 DIM strNew2 : strNew2 = "<RunSynchronous>" & Chr(10) &_   
                     "<RunSynchronousCommand wcm:action=" & Chr(34) & "add" & Chr(34) & ">" & Chr(10) &_   
                     "<Description>Map BIOS Drive</Description>" & Chr(10) &_   
                     "<Order>1</Order>" & Chr(10) &_   
                     "<Path>net use \\global.gsp\data\clients\na_clients\dell\bios /user:{username/password}</Path>" & Chr(10) &_   
                     "</RunSynchronousCommand>" & Chr(10) &_   
                     "<RunSynchronousCommand wcm:action=" & Chr(34) & "add" & Chr(34) & ">" & Chr(10) &_   
                     "<Description>Initiate HAPI</Description>" & Chr(10) &_   
                     "<Order>2</Order>" & Chr(10) &_   
                     "<Path>X:\CCTK\x86_64\HAPI\hapint -i -k C-C-T-K -p X:\CCTK\x86_64\HAPI\</Path>" & Chr(10) &_   
                     "</RunSynchronousCommand>" & Chr(10) &_   
                     "<RunSynchronousCommand wcm:action=" & Chr(34) & "add" & Chr(34) & ">" & Chr(10) &_   
                     "<Description>Set BIOS Settings</Description>" & Chr(10) &_   
                     "<Order>3</Order>" & Chr(10) &_   
                     "<Path>x:\CCTK\x86_64\cctk.exe -i \\global.gsp\data\clients\na_clients\Dell\BIOS\multiplatform.ini</Path>" & Chr(10) &_   
                     "</RunSynchronousCommand>"   
 DIM objFSO        : Set objFSO    = CreateObject("Scripting.FileSystemObject")   
 DIM objFile       : Set objFile    = objFSO.getFile(File)   
 DIM objTextStream : Set objTextStream = objFile.OpenAsTextStream(ForReading)   
 DIM strInclude    : strInclude    = objTextStream.ReadAll   

 objTextStream.Close   
 Set objTextStream = Nothing   
 If InStr(strInclude,strOld1) > 0 Then   
   strInclude = Replace(strInclude,strOld1,strNew1)   
   Set objTextStream = objFile.OpenAsTextStream(ForWriting)   
   objTextStream.Write strInclude   
   objTextSTream.Close   
   Set objTextStream = Nothing   
 End If   
 If InStr(strInclude,strOld2) > 0 Then   
   strInclude = Replace(strInclude,strOld2,strNew2)   
   Set objTextStream = objFile.OpenAsTextStream(ForWriting)   
   objTextStream.Write strInclude   
   objTextSTream.Close   
   Set objTextStream = Nothing   
 End If  
 
 REM Cleanup Local Variables   
 Set File          = Nothing   
 Set objFile       = Nothing   
 Set objFSO        = Nothing   
 Set objTextStream = Nothing   
 Set strInclude    = Nothing   
 Set strNew1       = Nothing   
 Set strNew2       = Nothing   
 Set strOld1       = Nothing   
 Set strOld2       = Nothing   

 End Sub   

 '*******************************************************************************   

 Sub DismountWIM()   

   REM Define Local Objects   
   DIM oShell : SET oShell = CreateObject("Wscript.Shell")   

   REM Define Local Variables   
   DIM MountDIR  : MountDIR  = RelativePath & "Mount"   
   DIM Command01 : Command01 = "DISM /Unmount-WIM /MountDir:" & MountDIR & Chr(32) & "/commit"   

   oShell.Run Command01, 1, True   

   REM Cleanup Local Variables   
   Set Command01 = Nothing   
   Set MountDIR  = Nothing   
   Set oShell    = Nothing   

 End Sub   

 '*******************************************************************************   

 Sub Complete()   

   MsgBox "Process Complete"   

 End Sub   

 '*******************************************************************************   

 Sub GlobalVariableCleanup()   

   Set LogFolder    = Nothing   
   Set RelativePath = Nothing   

 End Sub  


Multiplatform.ini File.

NOTE: The semi-colon in front of the items comments them out
 [cctk]  
 acpower=last  
 ;agpslot=enable  
 amblightsen=enable  
 ;autoon=disable  
 ;autoonhr=0  
 ;autoonmn=0  
 bltinfloppy=disable  
 ;bltinpntdevice=enable  
 ;bluetoothdevice=enable  
 bootorder=+hdd,+cdrom,+usbcdrom,+usbdev,+embnic,-floppy  
 ;camera=enable  
 ;cellularradio=enable  
 chasintrusion=disable  
 ;clearsel=yes  
 ;dbpm=enable  
 embnic1=on  
 embsataraid=ahci  
 ;embscsi1=off  
 ;embscsi2=off  
 ;embsdcard=on  
 ;embvideoctrl=enable  
 ;energystarlogo=enable  
 ;esataports=enable  
 ;expresscard=enable  
 expresscharge=enable  
 fastboot=minimal  
 floppy=usb  
 ;forcepxe=disable  
 hddacousticmode=performance  
 ;hddprotection=on  
 ;hdfreefallprotect=enable  
 hotdock=enable  
 ;htkeywxanradio=enable  
 ;idecdrom=auto  
 ;instanton=enable  
 ;integratedaudio=enable  
 ;integratedsas=disable  
 ;internalminipci=enable  
 ;interwirelessuwb=enable  
 ;ioat=enable  
 ;keyboardclick=disable  
 keyboardillumination=auto  
 ;keypad=enabledbynumlock  
 ;limitcpuidvalue=off  
 logicproc=enable  
 ;lowpowers5=disable  
 ;lpt=lpt1  
 ;mediacard=enable  
 ;mediacardand1394=enable  
 ;memtest=disable  
 ;microphone=enable  
 ;minicardssd=enable  
 ;mobilepowermgmt=enable  
 ;mouse=on  
 multicpucore=enable  
 ;onboard1394=enable  
 ;onboardmodem=enable  
 onreader=disable  
 ;opticaldrivectrl=enable  
 ;osmode=disable  
 ;pccardand1394=enable  
 ;pcisata=enable  
 ;pcislots=enable  
 ;postf12key=enable  
 ;postf2key=enable  
 ;postmebxkey=on  
 ;powerbutton=enable  
 ;radiotransmission=enable  
 ;rearsingleusb=on  
 ;rptkeyerr=enable  
 ;sata0=auto  
 ;smartcardreader=enable  
 ;smartcpu=enable  
 smarterrors=enable  
 ;speaker=on  
 speedstep=enable  
 ;splashscreen=disable  
 ;standbystate=s3  
 ;surroundview=enable  
 ;sysbatcharger=enable  
 ;sysfanspeed=noisereduce  
 ;tpm=off  
 ;trustexecution=on  
 ;turbomode=enable  
 ;usb=on  
 ;usb30=enable  
 ;usbctl=enable  
 ;usbports=enable  
 ;usbportsexternal=enable  
 ;usbportsfront=enable  
 ;usbreardual=on  
 ;usbrearquad=on  
 ;videoexpsn=enable  
 ;virtualappliance=on  
 virtualization=enable  
 vtfordirectio=on  
 wakeonlan=lanorwlan  
 ;wificatcherchanges=permit  
 ;wifilocator=enable  
 ;wirelessadapter=enable  
 ;wirelesslan=enable  
 ;wirelessuwb=enable  
 ;wirelesswitchbluetoothctrl=enable  
 ;wirelesswitchcellularctrl=enable  
 ;wirelesswitchnlanctrl=enable  

03 November 2011

SCCM/MDT Move the Installation Progress Window

This script is to allow you to see the pop-ups that occur during software installations which are hidden by the Installation Progress Window. This script moves the window to the top of the screen. The Deployment Guys originally wrote this in autoit for SMS. I have updated and simplified it for SCCM/MDT. I have also created two different scripts from the master one to work on x86 and x64 platform deployments. Here is the code to the scripts, but I also have the following links to download the source autoit au3 file that will need to be compiled: MoveInstallationProgressWindow_x86 & MoveInstallationProgressWindow_x64.

NOTE: These scripts will only function beginning in the State Restore phase of the deployment. I have tried to execute these in earlier phases with it leading to the build erroring out. This is because it requires the OS be laid down in order to have the necessary DLL files available for these VBScripts. It is possible to get these to function in earlier states, but this requires injecting additional DLLs into the WinPE files, besides what is supplied via MDT/SCCM in generating these files.

MDT/SCCM Utilization: In MDT 2012, I imported these scripts as applications and then inserted them into the appropriate areas of the task sequence. One thing you will have to be aware of is that if an application is set to reboot the machine after installation, you will need to insert another task sequence to move the window to the top afterwards. Also, during the windows updates, it's impossible to keep the window at the top because there will probably be some updates to cause a reboot during the process. I ended up skipping the move until post-pre-updates.

Here are the downloads for the x86 and x64 versions.

MoveInstallationProgressWindow_x86:


 ;** AUTOIT3 settings  
 #AutoIt3Wrapper_UseX64=N             ;(Y/N) Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. Default=N  
 ;** AUT2EXE settings  
 If $CmdLine[0] = 0 Then   
   ; Rerun ourself and let this copy return to the task sequencer   
   Run('"' & @AutoItExe & '" rerun')   
   Exit   
 EndIf  
 Sleep(2000)  
 $WindowName = "Installation Progress"  
 If WinExists($WindowName) Then   
   $size = WinGetPos($WindowName)  
   $size[1] = 0  
   WinMove($WindowName, "", $size[0], $size[1])   
 EndIf  


MoveInstallationProgressWindow_x64


 ;** AUTOIT3 settings  
 #AutoIt3Wrapper_UseX64=Y             ;(Y/N) Use X64 versions for AutoIt3_x64 or AUT2EXE_x64. Default=N  
 ;** AUT2EXE settings  
 If $CmdLine[0] = 0 Then   
   ; Rerun ourself and let this copy return to the task sequencer   
   Run('"' & @AutoItExe & '" rerun')   
   Exit   
 EndIf  
 Sleep(2000)  
 $WindowName = "Installation Progress"  
 If WinExists($WindowName) Then   
   $size = WinGetPos($WindowName)  
   $size[1] = 0  
   WinMove($WindowName, "", $size[0], $size[1])   
 EndIf  

30 September 2011

Office 2010 Deployment Project Template

Microsoft originally created the Project 2007 template for the deployment of Office 2007 but has not created one for Office 2010. I am beginning the process of deploying Office 2010 and decided to convert the 2007 Project deployment template for an Office 2010 deployment, along with tweaks and changes made to it. I removed a lot of fields that pertain to It has been saved in Project 2010 format with compatibility mode enabled.

Click here to download the Project 2010 deployment template

Dell BIOS Switches

The Dell BIOS executables do have switches. Dell does not openly publish the list. There are snippets in obscure locations on their site of two of these. There maybe more switches than I have listed, and if so, please post them, or if you know what one of the switches I have not defined does, please let me know. Before I discovered there were switches, I had gone to the trouble of writing a BIOS Silent Flash script that pushed the extracted hdr file to the system.

Here is the list with definitions of the switches I have been able to define:
Switch Definition
-boot
-classic
-edvu
-factory Resets the BIOS to factory settings
-forceit Forces the BIOS updates even if a laptop is not plugged into an AC power source
-forcetype Forces and BIOS file to any Dell model machine
-info
-jabil Force the BIOS updated even though the system says it is the wrong BIOS version
-nopause Prevents the BIOS update from prompting when executing
-norburesults No remote BIOS update results (no-rbu-results)
-noreboot Prevents the PC from rebooting after the BIOS is flashed
-prgboot Most likely is used to disable windows features when flashing from a bootable DOS media
-rburesults Remote BIOS update results (rbu-results)
-reportstatus Writes a dat file containing the current installed BIOS version
-verbose
-wipeall Cleans the DMI Data Area, Password, Service Tag, and Asset Tag
-wipeclean Clears the ESCD and DMI data tables. This is commonly used to resolve conflict issues and corrupted BIOS settings
-writehdrfile extracts the hdr (header) file to be flashed to the BIOS
-writehexfile extracts the hex (hexadecimal) format file to be flashed to the BIOS
-writeromfile extracts the ROM (Read Only Memory) file to be flashed to the BIOS


Command Line Execution Examples:

Used with MDT/SCCM as an application install allowing for the MDT/SCCM to reboot the machine upon completion:
T3400A11.EXE -nopause -noreboot

Writes a hdr, hex, and rom file
T3400A11.EXE -writehdrfile -writehexfile -writeromfile

Forces a BIOS update on a laptop without an AC power source
T3400A11.EXE -forceit -nopause

Creates a dat file in the same directory that contains the current installed BIOS version
T3400A11.EXE -reportstatus

NOTE: Not all of these switches work on all Dell BIOS updates executables. They vary by model. I have not confirmed these on all models, but I can tell you that the nopause, noreboot, writehdrfile, writehexfile, writeromfile, forceit, and reportstatus have worked on all 35 models that the company I work for has.

29 September 2011

Orca Tutorial -- Modifying an MSI file

In order to modify the installation process of an MSI file, you will need to use a program that can look at the MSI database. For that, I use Orca and Admin Studio. Both are great tools, but Orca is more in-depth and does not require an SCCM server.

The first thing is to download and install Orca. It is freeware and can be found in several places on the net. Second, make a copy of an MSI file to play around with.

There are usually three things we use Orca for. Those are: 1) the installation location, 2) Lookup properties to include in the command line argument, and/or 3) Answer all prompts.

When you first open up, I am using Quicktime.msi as an easy example, you will see the Tables on the left side. There are 4 primary tables that are most commonly dealt with in making changes. I have highlighted them in yellow and red, with red, Component and Property being the two that almost always will be used 95% of the time.


The property table is the table that has the most commonly changed properties. In my experience, the most common property I change is the INSTALLDIR, which sets the installation directory. The Component Table contains most of the conditions on each window. When you click on the component table, sort by the Condition column. This column contains most of the options in the installation windows. To make a change to one of these, go to the Property Table and add the condition as a property. Next, enter the preferred value for that condition. Checkboxes will be a 1 or 0 value, On or Off. You can also go to the Checkbox Table to see the list of all available checkboxes.


NOTE: The first thing you need to do before making changes is to click on the Transform--->New Transform. This sets the process up to generate the Transform file. This has to be done before you start making changes to the MSI file, otherwise you will lose all of the changes made. Second, unless you are absolutely sure that the changes you made are permanent, DO NOT CLICK FILE--->SAVE. This will permanently make changes to your MSI file and if you need to undo them, you will have to replace the file itself. Once you have created the new transform and made the changes, the last step is to click Transform-->Generate Transform. This creates the MST file that will be associated in the msiexec.exe command line argument.

There is also the option of not making a change inside the MSI and adding the Property to the command line.


So here are two examples of the msiexec.exe command line argument:
1) Including the transform file you generated
  • msiexec.exe /i QuickTime.msi TRANSFORMS=Transform.mst /qb- /norestart
2) Using the properties found inside the MSI Tables at the end of the command line argument
  • msiexec.exe /i QuickTime.msi /qb- /norestart INSTALLDIR="c:\temp"

I hope this helps in learning Orca. I pretty much learned all of my knowledge on my own and by messing around with installation files.

23 September 2011

MDT/SCCM 2010/2012 - Adding Optional Language Packs for Windows 7 to appear Optional in the Language Pack Window

There was little documentation on how to get a language pack to appear as an optional installation in the MDT 2010 process. You might first think to install it as an update as I did, but this is wrong unless you want it defined as a mandatory installation in the customsettings.ini file. So here is how to make the language pack window appear with all of the language packs you installed:
  1. In the customsettings.ini file, add the line SkipPackageDisplay=NO
  2. Create a folder under Applications names Language Packs
  3. Create a new application that installs the lp.cab file
    1. Quiet Install Command: pkgmgr.exe /ip /m:<Path to cab file>\lp.cab
You will need to create a separate application for each language pack that you want to make optional. That is all that's to it!

List of SCCM and MDT 2010/2012 Variables

There are three ways to get the list of variables that MDT uses:

  1. Technet has a comprehensive list of the SCCM/MDT variables located here.
  2. Michael Niehaus has a script that will dump all of the variables to a text file located here.
  3. This is the method I use. A SQL database will need to be created and linked to the MDT. Once done, click on the Roles subtab. Click New and select Details. All available variables will be listed.

20 September 2011

MDT/SCCM 2010 - Running Applications Installations under different credentials

You may have an application that needs special credentials when installing during the MDT deployment. As you have seen, there is no where to enter these credentials in the Applications section. There is the runas.exe, but the password cannot be passed through the command line as it demands manual entry. VBScript can be used in the installation package, but do you want to expose the password on the network?

You can use PsExec.exe to install the application under a specified credential. It is available for download here. Once it is downloaded, you can do one of the following: 1) add a task sequence in MDT to install the executable in the %SYSTEM32% directory on the target machine or 2) Place the PsExec.exe on a network share that will be accessible during the deployment.

So now that you have PsExec.exe available, here is how you use it in the build process:

  1. Create a new application in the Applications folder of MDT
  2. Fill in the Working directory with the location where the application resides
  3. The command line will be as follows:

<location of psexec.exe>\PsExec.exe \\%COMPUTERNAME% /accepteula -u <domain>\<username> -p <password> <installation commandline>

NOTE: The \\%COMPUTERNAME% is needed. You will continuously get an error 1 if it is not present. This uses the local computer name. The /accepteula is needed because if it is not accepted, it will prompt for acceptance during the silent install. The registry key is located under the HKCU, leaving this the easiest way to circumvent that. <location of psexec.exe> can be omitted if you have psexec.exe installed into the system32 directory.

VBScript NOTE: If you are running a VBscript for the , you do not need to put any of it in quotations.

16 August 2011

Fixing the "A fatal error occurred while trying to sysprep the machine" error

This occurs when a Windows 7 system has been sysprepped three times -- KB929828. To overcome this, you will need to do the following:

1) Inside the Sysprep Unattend.xml file located at c:\windows\system32\sysprep, delete skiprearm=1 from the section. In order to edit the Unattend.xml file, you will need to slave the HDD onto a working machine in order to have access to a text editor for editing the file.

2) Under HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\, set GeneralizationState to 7

3) From an administrative command prompt, type the following
msdtc -uninstall
msdtc -install

4) Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\, change SkipRearm to 1

5) disconnect the ethernet cable

6) Rerun the sysprep