Overview

The standard ENGL System Center Configuration Management deployment process requires someone to be present at a machine in order to start the process.

It is possible to automate the (re-)imaging of machines using the ENGL deployment process with System Center Configuration Management with some slight modifications.

Scenarios

The following imaging scenarios are covered in this TID:

  • Launch an Imaging Task Sequence from the Software Center

  • Forcing a machine to re-image by adding it to a specific Collection.

Requirements

  • ENGL deployment process configured and working using System Center Configuration Management

  • Access to the System Center console

  • Text editor

Procedures

Done Task
 
1. Create Boot Images
 
2. Create Zim package
 
3. Create Collection (if required)
 
4. Create and configure re-image Task Sequence(s)
 
5. Update deployment project
 
6. Deploy Task Sequence(s)
 
7. Add machines to Collection and test



  1. Create Boot Images

    The ENGL deployment process creates 2 Boot Images (x86 and x64). These Boot Images use a prestart command in order to ensure the latest Zim files are available in the imaging environment.
    The prestart command stops automatic imaging from running correctly so a copy of these boot images is required.

    • Launch the System Center console

    • Navigate to \Software Library\Overview\Operating Systems\Boot Images

    • Right click on the ENGL Boot Image (x86) boot image then select Properties

    • Select the Data Source tab then make a note of the Image Path
      (This is the path to the ENGL created winpe.wim file)

    • Click Cancel to exit the Boot Image Properties dialog

    • Select Add Boot Image from the ribbon bar

    • Browse to the path identified earlier and select the ENGL created winpe.wim file then click Next

    • Enter the following information:

      Name ENGL Boot Image (x86) Re-image
      Version 1.0
      Comment ENGL PE media used for automatic re-image (no prestart command)

      Then click Next

    • Click Next then wait until the Boot Image creation process has completed and then click Close to close the Add Boot image Wizard dialog

    • Right click on the newly created Boot Image then select Properties

    • Select the Customisation then do the following:

      • Enable the Windows PE Background - Specify the custom background image file (UNC path) option
        Then browse for to the .\Zimbin\englpe.bmp file

      • Enable the Enable command support (testing only) option

    • Select the Data Source tab then enable the Deploy this boot image from the PXE-enabled distribution point option

    • Click OK to save the changes. When prompted to update the distribution points with a new version, select No

  2. The Boot image has now been configured as required. This process can be repeated for the X64 boot image if required.

  3. Create a Zim package

    When booting using the normal PXE Task Sequence, Zim is loaded via the prestart command. This is not used with the re-image Task Sequence, so a Zim SCCM Package is required.
    Before the Package can be created the zimfiles folder on the System Center Configuration Management server will need to be updated as this folder structure will be used as the basis for the package.

    NOTE: The zimfiles folder will be found at c:\RemoteInstall\SMSTemp\zimfiles if System Center was installed to the c:\ drive. It can also be found at \\{sccmserver}\REMINST\SMSTemp\zimfiles.
    1. Create a HideTSProgress.vbs file in the zimfiles folder. This file is used to close the task sequence progress dialog while Zim is running.
      Create the file and add the following text into it:
      '
      ' HideTSProgress.vbs script
      '
      ' Used to close the task sequence progress dialog while Zim is running
      
        Set oTSProgressUI = CreateObject("Microsoft.SMS.TSProgressUI")
        oTSProgressUI.CloseProgressDialog
        Set oTSProgressUI = Nothing
      
      


    2. Create a zimrun.cmd file in the zimfiles folder. This file is used to run the HideTSProgress.vbs file and launch Zim.
       Create the file and add the following text:
      @ECHO OFF
      
      Rem Close the Task Sequence progress bar
      cscript HideTSProgress.vbs
      
      Rem Copy appropriate architecture files into package root
      Set PLATFORM=x86
      If %PROCESSOR_ARCHITECTURE%==AMD64 Set PLATFORM=x64
      copy %PLATFORM%\*.* . /y
      
      Rem Launch Zim
      
      md x:\zimbin
      xcopy . x:\zimbin /y /e
      x:\zimbin\zim.exe /s:x:\zimbin\zimauto.cfg /log:"x:\zim.log" /z


    3. Create a zimauto.cfg file in the zimfiles folder. This file is the Zim configuration script used to re-image the machine.

      NOTE: The sample file below will re-image a machine using information stored in ENGL Build data (EBD) to ensure that the project that was last deployed to the machine is re-applied.
      The file can be edited to define a specific project to be restored. The project information MUST exist in the projects.ini file within the Zim package.
       Several entries in the file are highlighted in green. These need to be replaced by values appropriate to your environment.

       Create the file and add the following text:

      ; *****************************************************************
      ; ENGL Imaging Toolkit 10.0.8 Build Console 
      ; Copyright (C) 1999-2017 Expert Networking Group Limited
      ;
      ; SCCM Automatic re-image zim.cfg
      ;
      ; *****************************************************************
      
      ; Settings
      Set:_ZimDir,"%SystemDrive%\zimbin\"
      
      ; Display log file for debugging
      If:File,Exist,"x:\zim.log"
        File:Run,"cmd /c start Ztrace /trace:x:\zim.log /zorder:bottom",verbose
      End:
      
      Set:_BgColor,"blue,black"
      Set:_HdrColor,"blue,white"
      
      Set:Images_Path,"\\{imageServer}\{Imagefolder}"
      Set:Images_Share_Username,"{username}"
      Set:Images_Share_Password,"{password}"
      Set:_Wim_LogPaths,"false"
      Set:_Wim_ShowCancel,"true"
      
      ; Deployment monitoring server settings
      Set:_MonitorServer,"{ENGL Monitor Server}"
      Set:_MonitorPort,"80"
      Set:_MonitorData_BuildData,""
      Set:_MonitorData_ComputerName,""
      Set:_MonitorData_LastError,""
      Set:_MonitorData_Project,""
      
      ; Get DMI info
      DMI:Get,"Base Board Information","Asset Tag", DMI_Board_Asset
      DMI:Get,"Base Board Information","Manufacturer", DMI_Board_Vendor
      DMI:Get,"Base Board Information","Product Name", DMI_Board_Product
      DMI:Get,"Base Board Information","Serial Number", DMI_Board_SN
      DMI:Get,"Base Board Information","Version", DMI_Board_Version
      DMI:Get,"Bios Information","Vendor", DMI_Bios_Vendor
      DMI:Get,"Chassis Information","Asset Tag", DMI_Chassis_Asset
      DMI:Get,"Chassis Information","Manufacturer", DMI_Chassis_Vendor
      DMI:Get,"Chassis Information","Serial Number", DMI_Chassis_SN
      DMI:Get,"Chassis Information","Type", DMI_Chassis_Type
      DMI:Get,"Compaq","Ownership Tag", DMI_Compaq_Owner
      DMI:Get,"System Information","Manufacturer", DMI_System_Vendor
      DMI:Get,"System Information","Product Name", DMI_System_Product
      DMI:Get,"System Information","Serial Number", DMI_System_SN
      DMI:Get,"System Information","Version", DMI_System_Version
      
      ; Check that the DMI values are populated on this machine
      If:Var,DMI_System_Vendor,NE,""
        Set:Lookup_Section,"%DMI_System_Vendor%"
        If:Var,Lookup_Section,EQ,"Lenovo"
          Set:Lookup_Value,"%DMI_System_Version%"
        ElseIf:Var,DMI_System_Product,NE,""
          Set:Lookup_Value,"%DMI_System_Product%"
        ElseIf:Var,DMI_Board_Product,NE,""
          Set:Lookup_Value,"%DMI_Board_Product%"
        Else:
          Set:Lookup_Value,"%DMI_Board_Vendor%"
        End:
      ElseIf:Var,DMI_Board_Product,NE,""
        Set:Lookup_Section,"%DMI_Board_Vendor%"
        Set:Lookup_Value,"%DMI_Board_Product%"
      Else:
        Set:Lookup_Section,"OEM"
        Set:Lookup_Value,"%DMI_Board_Vendor%"
      End:
      
      ; Read image details from lookup file
      File:Ini,Get,"%_ZimDir%images.ini","%Lookup_Section%","%Lookup_Value%",Hardware_Lookup
      
      ; Additional check for Lenovo machines
      If:Var,Lookup_Section,EQ,"Lenovo"
        If:Var,Hardware_Lookup,EQ,""
          Set:Lookup_Value,"%DMI_System_Product%"
          File:Ini,Get,"%_ZimDir%images.ini","%Lookup_Section%","%Lookup_Value%",Hardware_Lookup
        End:
      End:
      
      Set:Drivers_Image,token("%Hardware_Lookup%","|","1")
      Set:Machine_Type,token("%Hardware_Lookup%","|","2")
      Set:Driver_OS,token("%Hardware_Lookup%","|","3")
      
      ; Get network info
      Network:Get,eth0,IPADDR,Network_IP
      Network:Get,eth0,NETMASK,Network_Mask
      Network:Get,eth0,HWADDR,Network_Mac
      
      ; Read EBD:Custom
      EBD:Get,Custom,EBDSTRING
      
      ; Read information stored in EBD
      ; The project that was previously applied to the machine will be restored
      ; If a different project is required - manually add the project name
      ; and ensure that it is listed in the projects.ini file.
      
      Set:Lookup_Project,GetKeyPairStringValue("%EBDSTRING%", "Project")
      
      ; Manually set the project by commenting out the line above then setting the correct information on the next line.
      ;Set:Lookup_Project,"Windows 10 (x64)"
      
      ; ------------------------------------------------------
      ; Restore ENGL Smart Windows Deployment images
      ; ------------------------------------------------------
      
      Label:Restore_Ztoolkit_Begin
      
      ; Check hardware was found in lookup file
      If:Var,Drivers_Image,EQ,""
        Dialog:Ask,"","This machine type was not found in the lookup file.",_Ok,Red
        Goto:TheEnd
      End:
      
      Label:Lookup_Project_Info
      
      ; Read in project specific information
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Project_Image_Path",Project_Image_Path
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Project_OS",Project_OS
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Partition_Count",Partition_Count
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Driver_OS",Project_Driver_OS
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Base_Image",Base_Image
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Ztoolkit",Project_Ztoolkit
      File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Sccmcomp",Project_sccmcomp
      
      ; Validate the project information
      If:Var,Project_Image_Path,EQ,""
        Dialog:Ask,"Warning","The project has not been identified successfully. /n Automatic imaging of this machine cannot continue. /n Press Ok to restart the machine.",_Ok,Red
        Goto:TheEnd
      End:
      
      If:Var,Partition_Count,EQ,"1"
        Set:Project_Partition,"C:"
        File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Partition1_Size",Partition1_Size
      Else:
        Set:Project_Partition,"D:"
        File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Partition1_Size",Partition1_Size
        File:Ini,Get,"%_ZimDir%projects.ini","%Lookup_Project%","Partition2_Size",Partition2_Size
      End:
      
      ; Check to see if Hardware driver is available for Project_OS
      If:Var,Driver_OS,CONTAINS,"%Project_Driver_OS%"
        ; Hardware driver is available for this project
        Goto:Ztoolkit_ComputerName
      Else:
        ; Hardware driver is not available for this project
        Form:Start,"OS_Available","hardware image not found","_Ok",Blue
        Form:Item,"Item1",StaticText,"-The driver image for the selected Operating System"
        Form:Item,"Item2",StaticText,"-has not been found."
        Form:Item,"Item3",StaticText,"-Check the entry for this machine in the images.ini."
        Form:Item,"Item4",Label,"Selected OS"
        Form:Item,"Item5",EditBox,"%Project_Driver_OS%",ReadOnly
        Form:Item,"Item6",Label,"Available OS"
        Form:Item,"Item7",EditBox,"%Driver_OS%",ReadOnly
        Form:Item,"Item8",Label,"Hardware Image"
        Form:Item,"Item9",EditBox,"%Drivers_Image%",ReadOnly
        Form:Item,"Item10",StaticText,"-Select OK to return to the menu"
        Form:Display,"OS_Available"
        Goto:Theend
      End:
      
      Label:Ztoolkit_ComputerName
      
      ; Check for an AssetTag we can use for the DMI_NAME
      Set:DMI_NAME,""
      
      If:Var,DMI_Board_Asset,NE,""
        Set:DMI_NAME,"%DMI_Board_Asset%"
      ElseIf:Var,DMI_Chassis_Asset,NE,""
        Set:DMI_NAME,"%DMI_Chassis_Asset%"
      End:
      
      Set:COMPUTERNAME,""
      ; Read the Computer Name in from EBD (if it exists)
      EBD:Get,ComputerName,EBD_COMPUTERNAME
      
      If:Var,EBD_COMPUTERNAME,NE,""
        Set:COMPUTERNAME,"%EBD_COMPUTERNAME%"
      Else:
        Set:COMPUTERNAME,"%DMI_NAME%"
      End:
      
      ; validate computername
      If:Var,COMPUTERNAME,EQ,""
        Dialog:Ask,"","Computername is blank. Machine cannot be re-imaged. /n Automatic imaging of this machine cannot continue. /n Press Ok to restart the machine.","_Ok",Red
        Goto:theend
      Else:
        Set:ComputerNameLength,Len(%COMPUTERNAME%)
        If:Var,ComputerNameLength,GT,"15"
          Dialog:ask,"Error","The computer name is invalid. /n The computer name must be less than 16 characters. /n Automatic imaging of this machine cannot continue. /n Press Ok to restart the machine.","_ok",Red
        Goto:theend
        End:
      End:
      
      If:Var,COMPUTERNAME,CONTAINS," "
        Dialog:Ask,"Error","The computer name is invalid. /n The computer name must not contain a space. /n Automatic imaging of this machine cannot continue. /n  Press Ok to restart the machine.","_Ok",Red
        Goto:theend
      End:
      
      Dialog:Popup,"Restoring ENGL Smart Windows build process, please wait...",Green
      Pause:3
      
      ; Update EBDSTRING
      Set:EBDSTRING,PutKeyPairStringValue("%EBDSTRING%","Machine_Type","%Machine_Type%")
      Set:EBDSTRING,PutKeyPairStringValue("%EBDSTRING%","OS","%Project_OS%")
      Set:EBDSTRING,PutKeyPairStringValue("%EBDSTRING%","Project","%Lookup_Project%")
      
      Set:_MonitorData_Task,""
      Set:MonitorStatus,"Started"
      Gosub:SendUpdateToMonitorServer
      
      ; Re-assign drive letters
      SysInfo:MoveDriveLetters
      
      File:Run,"net use "%Images_Path%" /user:%Images_Share_Username% %Images_Share_Password%",silent
      
      ; Delete diskpart script if found
      If:File,Exist,"%_ZimDir%ZimDiskpartScript.txt"
        File:Delete,"%_ZimDir%ZimDiskpartScript.txt"
      End:
      
      If:EFI,Exist
        ; EFI machines
        ; Create diskpart script based on projects.ini partition information
        File:Append,"%_ZimDir%ZimDiskpartScript.txt","select disk 0"
        File:Append,"%_ZimDir%ZimDiskpartScript.txt","clean"
        File:Append,"%_ZimDir%ZimDiskpartScript.txt","convert gpt"
      
        If:Var,Partition_Count,EQ,"1"
          ; System partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition efi size=260 noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","format quick fs=fat32 label=System"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=S noerr"
      
          ; Microsoft Reserved(MSR) partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition msr size=128 noerr"
      
          ; Windows partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition primary noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","format quick fs=ntfs label=Windows noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=C noerr"
        Else:
          ; System partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition efi size=260 noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","format quick fs=fat32 label=System"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=C noerr"
      
          ; Microsoft Reserved(MSR) partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition msr size=128 noerr"
      
          ; Windows partition
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition primary noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","format quick fs=ntfs label=Windows noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=D noerr"
        End:
      
        File:Append,"%_ZimDir%ZimDiskpartScript.txt","exit"
      
        Set:_MonitorData_Task,"Restoring %Base_Image%"
        Set:MonitorStatus,"Started"
        Gosub:SendUpdateToMonitorServer
        Wim:Apply,"%Images_Path%\os\%Project_OS%\%Base_Image%.wim"
        If:Var,_Error,Eq,1
          ; Error applying image
          Set:_MonitorData_LastError,"Failed to restore image: %Images_Path%\os\%Project_OS%\%Base_Image%.wim"
          Gosub:SendUpdateToMonitorServer
          Dialog:Ask,"Error","Failed to restore image:\n\n%Images_Path%\os\%Project_OS%\%Base_Image%.wim\n\nClick OK to return to menu.",_Ok
          Menu:Return
        End:
        Set:MonitorStatus,"Finished"
        Gosub:SendUpdateToMonitorServer
      
        ; Copy boot files from the Windows partition to the System partition
        File:Run,"bcdboot %Project_Partition%\Windows"
      
        Else:
          ; BIOS machines
          ; Create diskpart script based on projects.ini partition information
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","select disk 0"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","clean"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition PRIMARY size=%Partition1_Size% noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","select partition 1"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","active"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=C noerr"
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","format fs=NTFS quick noerr"
      
          If:Var,Partition_Count,EQ,"2"
            File:Append,"%_ZimDir%ZimDiskpartScript.txt","create partition PRIMARY size=%Partition2_Size% noerr"
            File:Append,"%_ZimDir%ZimDiskpartScript.txt","select partition 2"
            File:Append,"%_ZimDir%ZimDiskpartScript.txt","assign letter=D noerr"
            File:Append,"%_ZimDir%ZimDiskpartScript.txt","format fs=NTFS quick noerr"
          End:
      
          File:Append,"%_ZimDir%ZimDiskpartScript.txt","exit"
      
          Set:_MonitorData_Task,"Restoring %Base_Image%"
          Set:MonitorStatus,"Started"
          Gosub:SendUpdateToMonitorServer
          Wim:Apply,"%Images_Path%\os\%Project_OS%\%Base_Image%.wim"
          If:Var,_Error,Eq,1
            ; Error applying image
            Set:_MonitorData_LastError,"Failed to restore image: %Images_Path%\os\%Project_OS%\%Base_Image%.wim"
            Gosub:SendUpdateToMonitorServer
            Dialog:Ask,"Error","Failed to restore image:\n\n%Images_Path%\os\%Project_OS%\%Base_Image%.wim\n\nClick OK to return to reboot.",_Ok
            Goto:theend
          End:
          Set:MonitorStatus,"Finished"
          Gosub:SendUpdateToMonitorServer
        End:
      
        Set:_MonitorData_Task,"Restoring hotfixes.wim"
        Set:MonitorStatus,"Started"
        Gosub:SendUpdateToMonitorServer
        Wim:Apply,"%Images_Path%\projects\%Project_Image_Path%\hotfixes.wim","1","%Project_Partition%"
        Set:MonitorStatus,"Finished"
        Gosub:SendUpdateToMonitorServer
        If:Var,Project_Sccmcomp,NE,""
          Set:_MonitorData_Task,"Restoring %Project_sccmcomp%.wim"
          Set:MonitorStatus,"Started"
          Gosub:SendUpdateToMonitorServer
          Wim:Apply,"%Images_Path%\projects\%Project_Image_Path%\%Project_sccmcomp%.wim","1","%Project_Partition%"
          Set:MonitorStatus,"Finished"
          Gosub:SendUpdateToMonitorServer
        End:
      
        Set:_MonitorData_Task,"Restoring %Project_Ztoolkit%.wim"
        Set:MonitorStatus,"Started"
        Gosub:SendUpdateToMonitorServer
        Wim:Apply,"%Images_Path%\projects\%Project_Image_Path%\%Project_Ztoolkit%.wim","1","%Project_Partition%"
        If:Var,_Error,Eq,1
          ; Error applying image
          Set:_MonitorData_LastError,"Failed to restore image: %Images_Path%\projects\%Project_Image_Path%\%Project_Ztoolkit%.wim"
          Gosub:SendUpdateToMonitorServer
          Dialog:Ask,"Error","Failed to restore image:\n\n%Images_Path%\projects\%Project_Image_Path%\%Project_Ztoolkit%.wim\n\nClick OK to return to reboot.",_Ok
          goto:TheEnd
        End:
        Set:MonitorStatus,"Finished"
        Gosub:SendUpdateToMonitorServer
        Set:_MonitorData_Task,"Restoring %Drivers_Image%.wim"
        Set:MonitorStatus,"Started"
        Gosub:SendUpdateToMonitorServer
        Wim:Apply,"%Images_Path%\drivers\%Project_Driver_OS%\%Drivers_Image%.wim","1","%Project_Partition%"
        Set:MonitorStatus,"Finished"
        Gosub:SendUpdateToMonitorServer
        File:Run,"net use "%Images_Path%" /delete /yes", silent
        Pause:2
        Dialog:Popupclose
      
        ; Update the information in EBD
        If:Var,EBD_COMPUTERNAME,NE,""
          ; Only update the computername if it was not set in EBD
          EBD:Put,ComputerName,"%COMPUTERNAME%"
        End:
      
        EBD:Put,Custom,"%EBDSTRING%"
        EBD:Write
      
        ; Trap EBD:Write errors
        If:Var,_ERROR,NE,"0"
          Dialog:Ask,"Error!","An error occurred writing information to EBD!","_Ok",Red
        End:
      
        Set:_MonitorData_Task,""
        Set:MonitorStatus,"Finished"
        Gosub:SendUpdateToMonitorServer
      
        Goto:Reboot
      
      ; ------------------------------------------------------
      ; Send Update to Monitor Server
      ; ------------------------------------------------------
      
      Label:SendUpdateToMonitorServer
      
      If:Var,_MonitorServer,NE,""
      
      Set:_MonitorData_Project,"%Lookup_Project%"
      Set:_MonitorData_ComputerName,"%COMPUTERNAME%"
      Set:_MonitorData_BuildData,"%EBDSTRING%"
      
      Monitor:SendUpdate,"%MonitorStatus%"
      End:
      
      Return:
      
      ; ------------------------------------------------------
      ; Reboot
      ; ------------------------------------------------------
      
      Label:Reboot
      
      Dialog:Popup,"Restarting, please wait..."
      Pause:2
      
      ; Let the TS handle the reboot
      ;File:Run,"wpeutil reboot", silent
      
      
      ; ------------------------------------------------------
      ; The End
      ; ------------------------------------------------------
      
      Label:TheEnd
    4. Update additional files in the zimfiles folder structure.
       The standard ENGL boot images have had several files added to ensure that Zim runs correctly. These files need to be added to the zimfiles folder structure.

      1. x86 files.
         Copy *.dll from {x86 winpe path}\Zimbin\ to \\{sccmserver}\REMINST\SMSTemp\zimfiles\x86

      2. x64 files.
         Copy *.dll and Microsoft.VC80.CRT.manifest from {x64 winpe path}\Zimbin\ to \\{sccmserver}\REMINST\SMSTemp\zimfiles\x64

    5. NOTE: The paths: {x86 winpe path} and {x64 winpe path} are the paths identified when configuring the Boot Images earlier.


    6. Create the Zim package.

      1. Launch the System Center console

      2. Navigate to \Software Library\Overview\Application Management\Packages

      3. [Optional] Create an ENGL folder to contain the Zim package

      4. Select Create Package from the ribbon bar

      5. Populate the requested information:

        Name ENGL Zim (for remote re-image)
        Description ENGL Zim media used for automatic re-image
        Manufacturer ENGL
        Language EN
        Version 1.0

         Enable the This package contains source files option.

         Browse to the \\{sccmserver}\REMINST\SMSTemp\zimfiles folder then click Next

      6. When prompted select Do not create a program then click Next

      7. Click Next

      8. Click Close

    7.  The Zim Package has now been created successfully.

      NOTE: If you update your Zim binaries you must remember to update the Package. In Configuration Manager Console, navigate to Software Library\Overview\Application Management\Packages. Right-click ENGL Zim (for remote re-image), and then click Update Distribution Points.


  4. Create Collection

    If the Task Sequence(s) are to be deployed using the [Required] option it is recommended that a new Collection is configured.
     This will ensure that only the machines that are a member of the Collection are re-imaged.

     To set up a new Collection do the following:

    1. Launch the System Center console

    2. Navigate to \Assets and Compliance\Overview\Device Collections

    3. [Optional] Create an ENGL folder to contain the re-image Collection

    4. Select Create Device Collection from the ribbon bar

    5. Populate the requested information:

      Name ENGL Re-image Devices
      Comment Collection used to target machines for a re-image
      Limiting collection All Desktop and Server Clients (or any more appropriate Collection)

       Then click Next

    6. When prompted enable Use incremental updates for this collection then click Next

    7. When prompted about membership rules click Ok as machines will be manually added to this collection

    8. Click Next

    9. Click Close

    10. Right click on the newly created collection then select Properties

    11. Select the General tab then make a note of the Collection ID for use later.

  5.  The ENGL Re-image Devices collection has now been created successfully.

  6. Create and configure re-image Task Sequence(s)

    A Task Sequence is required for both x86 and x64 re-image processes. Both Task Sequences will use the Zim Package created earlier.

     The following steps will create the x86 Task Sequence:

    1. Launch the System Center Console

    2. Navigate to \Software Library\Overview\Operating Systems\Task Sequences

    3. [Optional] Create an ENGL folder to contain the re-image task sequences

    4. Select Create Task Sequence from the ribbon bar

    5. When prompted select Create a new custom task sequence then click Next

    6. Populate the requested information:

      Task sequence name ENGL Re-image (x86)
      Description Re-image a machine using ENGL deployment process

       Browse and select the ENGL Boot Image (x86) Re-image boot image then click Next

    7. Click Next

    8. Click Close

  7.  The Task Sequence has now been created successfully. It now needs some additional configuration.

    1. Right click on the newly created task sequence, then select Edit

    2. Select Add - General - Restart Computer  to add a Restart computer task sequence step

    3. Update the information in the step as follows:

      • Select the Properties tab

        Properties Tab
        Name Restart to Windows PE
        Description Restart to Windows PE
        Notification Message Launching ENGL reimage process
        Message display time-out (seconds) 2


      • Select the Options tab

         Click on Add Condition - Task Sequence Variable

        Task Sequence Variable
        Variable _SMSTSInWinPE
        Condition equals
        Value false


         This will stop Zim from running within Windows when the Task Sequence is launched from the Software Center.

    4. Select Add - General - Run Command line  to add a Run Command line Task Sequence step. This needs to be below the Restart to Windows PE Task Sequence step.

    5. Update the information in the step as follows:

      • Select the Properties tab

        Properties Tab
        Name Launch Zim
        Description Launch Zim using zimauto.cfg as the config file.
        Command Line cmd.exe /c zimrun.cmd
        Disable 64-bit file system redirection Enabled (ticked)
        Package Enabled (ticked)
        Package Browse to and select the ENGL Zim (for remote re-image) package


      • Select the Options tab and set:

        Options Tab
        Success Codes 0 1

    6. Click on Ok to save the changes to the Task Sequence

  8. Once the Task Sequence has been created successfully the process can be repeated to create an x64 Task Sequence.

    NOTE: The Task Sequence(s) will need to be distributed to the appropriate distribution point(s) before they can be tested.
  9. Update deployment project

    If the Task Sequence(s) are to be deployed using the [Required] option it is recommended that the project is configured to ensure that the workstation object is removed from the Imaging collection in phase 2.

     To configure the project to do this perform the following actions:

    1. Launch Build Console

    2. Open the SCCM project that is to be deployed

    3. Select the Expert View

    4. Select Customisation - Custom Files

    5. Right click on phase2-before.vbs from the Properties pane and select Edit

       The phase2-before.vbs file will open in the default text editor on the machine running Build Console

    6. Add the lines in green to the file as follows:
      ' ENGL Build Console 10.0
      ' Copyright (C) 1999-2015 Expert Networking Group Limited
      '
      ' Custom script template (phase2-before.vbs)
      
      ' Attach to ENGL Ztoolkit ActiveX Control
      Set LDAP = CreateObject("ENGL.Ztoolkit.LDAP")
      Set Utils = CreateObject("ENGL.Ztoolkit.Utils")
      Set SCCM = CreateObject("ENGL.Ztoolkit.SCCM")
      
      ' Add custom script here...
      
      Utils.AppendLog "*** Removing machine from ENGL Re-image Collection {LAB00015} ***"
      SCCM.RemoveFromCollection "LAB00015"
      
      NOTE: Replace LAB00015 with the ENGL Re-image collection ID identified earlier [Step 3.11]

       then save and close the file

    7. To recreate the build process (ztoolkit.wim) file select Tools - Validate project settings.
       If any issues are reported resolve these prior to continuing

    8. Select Tools - Deployment Wizard

    9. When prompted select Build process creation from the Deployment Tasks page then select Next

    10. Enable Build process (ztoolkit.wim) from the Build Process Image Creation page then select Next

      NOTE: The SCCM components (sccmcomp.wim) image has not been modified so can be deselected if required.
    11. Once the Deployment Wizard has completed, copy the updated image file(s) to the appropriate location on the imaging server

  10. Deploy Task sequence(s)

    • Launch The System Center console

    • Navigate to \Software Library\Overview\Operating Systems\Task Sequences

    • Right click on the task sequence you wish to deploy [ENGL Re-image (x86) or ENGL Re-image (x64)] then select Deploy

    • Browse for and select the Collection to which the Task Sequence is to be deployed. (Either use an existing Collection or the one that was created in step 3),  then select Next

    • Set the deployment purpose:

      • If the Purpose of the deployment is set to Available then the re-image will occur when the option is selected in the Software Center.
         Ensure that the Make available to the following option is set to Only Configuration Manager Clients

      • If the Purpose of the deployment is set to Required then the re-image will occur as soon as the machine is aware of the deployment.
        • If you wish machines to restart while running Windows and then re-image, ensure that the Make available to the following option is set to Only Configuration Manager Clients

        • If you wish machines to re-image on a restart ensure that the Make available to the following option is set to Only media and PXE

        • If you wish machines to restart while running Windows or begin to re-image on first restart, ensure that the Make available to the following option is set to Configuration Manager Clients, media and PXE

    •  Configure appropriate settings for the remainder of the Deploy Software wizard.
       The re-image Task Sequence(s) are now ready for deployment.

  11. Add machines to Collection and test.

    The Task Sequence is now associated to an empty Collection. As soon as a machine is added to the Collection, the Task Sequence will be available to the machine.
     If the deployment purpose is set to Available then the Task Sequence can be found in the Software Center.
     If the deployment purpose is set to Required then the Task Sequence will start as soon as it can. If the machine is running Windows then it will restart and then re-image.
     If it is not running Windows but is subsequently powered on the Task Sequence will boot to Windows PE and the machine will be re-imaged.


If you have any problems or questions about the steps in this TID  please contact the ENGL support team