This change is a replacement of the isOSReady function in the script. Essentially, more cases are added so that if the disk number isn't 0 or if the disk is USB connected at all, it isn't considered to be OS ready (which is used for things like deciding where the BCD database actually resides and which volume is registered in UEFI as the boot disk).

Function isOSReady( sOSBuild)
    'Check to see if this disk is "capable" of installing an OS
    
    Dim oUSBDevice
    Dim oUSBController
    Dim oUSBPnPEnum
    Dim sPnPID
    
    If not isempty(g_Win32_DiskDrive) then
        oLogging.CreateEntry "Disk Interface Type is " & g_Win32_DiskDrive.InterfaceType, LogTypeInfo
        isOSReady = g_Win32_DiskDrive.InterfaceType <> "USB" and g_Win32_DiskDrive.InterfaceType <> "1394"
        oLogging.CreateEntry "isOSReady first attempt is " & isOSReady, LogTypeInfo
        
        If not isOSReady then
            oLogging.CreateEntry "isOSReady result is FALSE due to interface type", LogTypeInfo
            Exit Function
        End If
        
        oLogging.CreateEntry "Disk Number is " & g_Win32_DiskDrive.Index, LogTypeInfo
        if g_Win32_DiskDrive.Index <> 0 Then
            isOSReady = False
            oLogging.CreateEntry "Not marking this as a workable disk since it isn't disk 0.", LogTypeInfo
            Exit Function
        End If
        
        oUtility.GetMajorMinorVersion(sOSBuild)
        If len(trim(sOSBuild)) = 0 Then
            oLogging.CreateEntry "isOSReady doing nothing since no sOSBuild specified", LogTypeInfo
        ElseIf oUtility.VersionMajor > 6 Then
            For Each oUSBDevice in objWMI.ExecQuery("ASSOCIATORS OF {" & g_Win32_DiskDrive.Path_ & "} WHERE AssocClass = Win32_PnPDevice")
                oLogging.CreateEntry "PnP Device associated with " & g_Win32_DiskDrive.Path_ & " is " & oUSBDevice.Path_, LogTypeInfo
                For Each oUSBController in objWMI.ExecQuery("ASSOCIATORS OF {" & oUSBDevice.Path_ & "} WHERE AssocClass = Win32_USBControllerDevice")
                    oLogging.CreateEntry "USB Controller associated with " & oUSBDevice.Path_ & " is " & oUSBController.Path_, LogTypeInfo
                    For Each oUSBPnPEnum in objWMI.ExecQuery("ASSOCIATORS OF {" & oUSBController.Path_ & "} WHERE AssocClass = Win32_PnPDevice")
                        oLogging.CreateEntry "PnP Device associated with " & oUSBController.Path_ & " is " & oUSBPnPEnum.Path_, LogTypeInfo
                        For Each sPnPID in oUSBPnPEnum.CompatibleID oLogging.CreateEntry "PnP CompatibleID is " & sPnPID, LogTypeInfo
                        
                            If sPnPID = "PCI\\CC_0C0330" Then
                                oLogging.CreateEntry "Found USB 3.0 Ready Disk: " & g_Win32_DiskDrive.Path_, LogTypeInfo
                                isOSReady = False 'Don't install on USB 3.0 disks
                                oLogging.CreateEntry "USB 3.0; isOSReady set to FALSE", LogTypeInfo
                                Exit Function
                            End If
                        
                            If (sPnPID = "PCI\\CC_0C0320") or (sPnPID = "PCI\CC_0C0320") Then
                                oLogging.CreateEntry "Found USB 2.0 Ready Disk: " & g_Win32_DiskDrive.Path_, LogTypeInfo
                                isOSReady = False 'Don't install on USB 2.0 disks
                                oLogging.CreateEntry "USB 2.0; isOSReady set to FALSE", LogTypeInfo
                                Exit Function
                            End If
                            
                            If (sPnPID = "PCI\\CC_0C03") or (sPnPID = "PCI\CC_0C03") Then
                                oLogging.CreateEntry "Found USB Ready Disk: " & g_Win32_DiskDrive.Path_, LogTypeInfo
                                isOSReady = False 'Don't install on USB disks
                                oLogging.CreateEntry "USB; isOSReady set to FALSE", LogTypeInfo
                                Exit Function
                            End If
                        
                        Next
                    Next
                Next
            Next
        End If
    End If

    oLogging.CreateEntry "isOSReady final result is " & isOSReady, LogTypeInfo
End Function