<?xml version="1.0" encoding="utf-8"?>
<SetupFX FormatVersionMajor="3" FormatVersionMinor="6">
    <Task Id="IsCurrentSystemSupported">
        <Action Id="IsCurrentSystemSupported" SupportedOS="OSSupportedBySetup" SupportedProcessorArchitectures="ProcessorArchitecturesSupportedBySetup"/>
    </Task>
    <Task Id="CheckRequirementsToStart">
        <Action Id="WaitForPendingPnPInstallation"/>
    </Task>
    <Task Id="ValidateTargetPathRoot">
        <Action Id="CheckTargetPath" OnlyRoot="True"/>
    </Task>
    <Task Id="LegacyUninstall">
        <Action Id="AbortOnReboot" Reason="ToContinue"/>
    </Task>
    <Task Id="PrepareInstall">
        <Action Id="IsCurrentUserAdmin"/>
        <Action Id="CheckCodeIntegrity" DriverFile="Driver.Pkg.Sys" UseTargetPath="True"/>
        <Action Id="UnregisterInProcessServer" ServerFiles="Driver.Pkg.Register"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.InfBus" UseTargetPath="True"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.Inf" UseTargetPath="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.InfBus" UseTargetPath="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.Inf" UseTargetPath="True"/>
        <Action Id="AbortOnReboot" Reason="ToContinue"/>
    </Task>
    <Task Id="Install">
        <Action Id="CheckTargetPath"/>
        <Action Id="RegisterInProcessServer" ServerFiles="Driver.Pkg.Register"/>
        <Action Id="InstallDrivers" InfFiles="Driver.Pkg.Inf"/>
        <Action Id="InstallDrivers" InfFiles="Driver.Pkg.InfBus"/>
        <Action Id="AbortOnReboot" Reason="ToComplete"/>
    </Task>
    <Task Id="PostInstall"/>
    <Task Id="PrepareUninstall"/>
    <Task Id="Uninstall">
        <Action Id="IsCurrentUserAdmin"/>
        <Action Id="UnregisterInProcessServer" ServerFiles="Driver.Pkg.Register"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.InfBus" UseTargetPath="True" ForceRemoval="True"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.Inf" UseTargetPath="True" ForceRemoval="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.InfBus" UseTargetPath="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.Inf" UseTargetPath="True"/>
        <Action Id="AbortOnReboot" Reason="ToComplete"/>
    </Task>
    <Task Id="UninstallForUpdate">
        <Action Id="IsCurrentUserAdmin"/>
        <Action Id="UnregisterInProcessServer" ServerFiles="Driver.Pkg.Register"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.InfBus" UseTargetPath="True"/>
        <Action Id="UninstallDevices" DevicesByInfs="Driver.Pkg.Inf" UseTargetPath="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.InfBus" UseTargetPath="True"/>
        <Action Id="UninstallDrivers" DriversByInfs="Driver.Pkg.Inf" UseTargetPath="True"/>
        <Action Id="AbortOnReboot" Reason="ToContinue"/>
    </Task>
    <Task Id="DoInstall">
        <Action Id="Forward" Task="IsCurrentSystemSupported"/>
        <Action Id="Forward" Task="CheckRequirementsToStart"/>
        <Action Id="Forward" Task="ValidateTargetPathRoot"/>
        <Action Id="Forward" Task="LegacyUninstall"/>
        <Action Id="Forward" Task="PrepareInstall"/>
        <Action Id="AbortOnReboot" Reason="ToContinue"/>
        <Action Id="Forward" Task="Install"/>
        <Action Id="Forward" Task="PostInstall"/>
        <Action Id="AbortOnReboot" Reason="ToComplete"/>
    </Task>
    <Task Id="DoUninstallForUpdate">
        <Action Id="Forward" Task="IsCurrentSystemSupported"/>
        <Action Id="Forward" Task="CheckRequirementsToStart"/>
        <Action Id="Forward" Task="PrepareUninstall"/>
        <Action Id="Forward" Task="UninstallForUpdate"/>
        <Action Id="AbortOnReboot" Reason="ToContinue"/>
    </Task>
    <Task Id="DoUninstall">
        <Action Id="Forward" Task="IsCurrentSystemSupported"/>
        <Action Id="Forward" Task="CheckRequirementsToStart"/>
        <Action Id="Forward" Task="PrepareUninstall"/>
        <Action Id="Forward" Task="Uninstall"/>
        <Action Id="AbortOnReboot" Reason="ToComplete"/>
    </Task>
    <OSVersionSet Id="OSSupportedBySetup">
        <OSVersion>W10_1507+</OSVersion>
        <OSVersion>S2016+</OSVersion>
    </OSVersionSet>
    <ProcessorArchitectureSet Id="ProcessorArchitecturesSupportedBySetup">
        <ProcessorArchitecture>x86</ProcessorArchitecture>
    </ProcessorArchitectureSet>
    <Component Id="Driver">
        <DriverPackage Id="Pkg">
            <FileSet Id="Inf">
                <FileName>HerculesStream200XLRks.inf</FileName>
            </FileSet>
            <FileSet Id="InfBus">
                <FileName>HerculesStream200XLR.inf</FileName>
            </FileSet>
            <FileSet Id="Register">
                <FileName>HerculesStream200XLRapi.dll</FileName>
                <FileName>HerculesStream200XLRasio.dll</FileName>
            </FileSet>
            <File Id="Sys">
                <FileName>HerculesStream200XLR.sys</FileName>
            </File>
        </DriverPackage>
    </Component>
</SetupFX>
