Imaging Toolkit 12 includes the ability to deploy devices with Autopilot. The deployment process does not run phases 1, 2 and 3 and therefore setup.exe drivers are not automatically installed. Imaging Toolkit 12.0.5 and later have the ability to install setup.exe type drivers during the Autopilot Device Setup ESP phase. We recommend enabling the ENGL Monitor Service in your Autopilot project to enable detailed Autopilot deployment process logging, including the driver installation process.


This TID provides the steps to configure setup.exe type driver installation during the Autopilot Device Setup ESP phase.


Requirements

  • Imaging Toolkit 12.0.5 or later
  • Driver image for the device being deployed


Procedure

Complete the following steps to configure driver installation during the Autopilot deployment process.


  1. Create a Powershell script file with the following content:

    # Powershell script to install drivers during phase4 of the Autopilot deployment process
    
    # Define the Imaging Toolkit registry path
    $registryPath = 'HKLM:\Software\ENGL\Ztoolkit'
    
    # Check if the registry key exists
    if (Test-Path $registryPath) 
    {
        # Get the values in the subkey
        $phase = Get-ItemProperty -Path $registryPath -ErrorAction SilentlyContinue
    
        # Only run during Phase 4 of the deployment process
        if ($phase -ne $null -And $phase.RestartPhase -eq "4") 
        {
            $zmainrun = Start-Process -FilePath C:\ztoolkit\zmainrun.exe -ArgumentList  
              "/Build","/DriversOnly","/log","/z" -PassThru
            $zmainrun.WaitForExit()
        }
    }

  2. Go to the Microsoft Intune admin center and select the Scripts and remediations blade within Devices.

  3. Select the Platform Scripts tab and click Add, select Windows 10 and later, the provide a name for the script and click Next.

  4. On the Script Settings tab provide a path to the Powershell script created in step 1. Ensure Run this script using the logged on credentials is set to No and Run script in 64 bit Powershell Host is set to Yes.

  5. Click Next twice to reach the Assignments tab and select the appropriate device group as per your project configuration.

  6. Click Next then Add.


Testing

Perform the following steps to test driver installation during Autopilot deployment.


  1. PXE boot a machine, from the ENGL imaging menu, select Restore menu, then select an Autopilot project.

  2. Review the log for the deployment in the ENGL Monitor Service and review the driver installation process during Phase 4