;-------------------------------------------------------------------------------
; Intel® Confidential
;
; Copyright (c) 2013-2025 Intel Corporation All Rights Reserved 
;
; The source code contained or described herein and all documents related to 
; the source code ("Material") are owned by Intel Corporation or its suppliers 
; or licensors. Title to the Material remains with Intel Corporation or its 
; suppliers and licensors. The Material contains trade secrets and proprietary 
; and confidential information of Intel or its suppliers and licensors. The 
; Material is protected by worldwide copyright and trade secret laws and treaty 
; provisions. No part of the Material may be used, copied, reproduced, 
; modified, published, uploaded, posted, transmitted, distributed, or 
; disclosed in any way without Intel's prior express written permission.
;
; No license under any patent, copyright, trade secret or other intellectual 
; property right is granted to or conferred upon you by disclosure or delivery 
; of the Materials, either expressly, by implication, inducement, estoppel or 
; otherwise. Any license under such intellectual property rights must be 
; expressed and approved by Intel in writing.
;------------------------------------------------------------------------------

[Version] 
Signature   = "$WINDOWS NT$" 
Class       = System
ClassGUID   = {4D36E97D-E325-11CE-BFC1-08002BE10318}
Provider    = %INTEL% 
CatalogFile = kpe_apo.cat
DriverVer = 11/17/2025,9.1.10003.555
PnpLockDown = 1

;----------------------------------------------------------------------
; File Information
;----------------------------------------------------------------------

[SourceDisksNames]
1 = %DiskName%,,,""

[SourceDisksFiles.amd64]
kpe_apo.sys=1,,
APO_PROCS64.dll=1,,
ibtpgo64.dll=1,,
trace-agent.exe = 1,SKR,
0493b1cf-608a-4b49-b378-b54eb8b3b0c1.bin = 1,SKR,
1e67a31e-70f1-49a0-b26c-898831814752.bin = 1,SKR,
2b497056-8d91-435c-ba2a-5c7bd1df7306.bin = 1,SKR,
2ee08c04-2566-490e-a65c-c8b81f55bb2f.bin = 1,SKR,
43a729d2-f33c-4a40-bd6a-cc01968acc96.bin = 1,SKR,
4abcc309-253e-4b89-aba0-c0ecd9457fbb.bin = 1,SKR,
7573fc12-f39d-4933-8b12-e3af774b193d.bin = 1,SKR,
76a39119-8cd6-4fcb-ba62-e9cf0cfb7c4c.bin = 1,SKR,
84cf7d80-5433-4f7b-bf21-b26d07f0d76b.bin = 1,SKR,
a766eca2-3799-4398-aba1-ec226751fdd2.bin = 1,SKR,
b509fa2f-1b76-43f4-9fea-17f4b95067d3.bin = 1,SKR,
cfa40c92-f9ae-40e6-9554-ac4c80bf4b68.bin = 1,SKR,
d250b4d7-d3da-4f2a-aabe-602447465d94.bin = 1,SKR,
e14bb0b0-d8d7-4cd5-8fdc-f64205464eb7.bin = 1,SKR,
eb9ef333-6abe-431f-a629-c2f0614c906e.bin = 1,SKR,
rsds_218f9c2b-01ae-4e34-981a-b6a93cc4027a_1.json = 1,SKR,
rsds_35d34730-b7b0-45f2-a275-1777cd71ff76_1.json = 1,SKR,
rsds_38e88e5b-b72d-4a9e-8791-8ef8b5fc226c_1.json = 1,SKR,
rsds_456740e5-ba41-4b88-b353-231126bb828e_2.json = 1,SKR,
rsds_a2c6e341-2954-4557-baaa-5969d736b5f2_1.json = 1,SKR,
rsds_b0385946-e0c4-4bac-bebc-afab8fa12f51_1.json = 1,SKR,
rsds_c7567987-52cf-473c-bf1f-4cc321ae216f_2.json = 1,SKR,
rsds_da5e7e8c-de69-47c9-9707-4d0f98b728da_2.json = 1,SKR,
rsds_efa210c4-5b63-4543-920a-de1d24548b52_10.json = 1,SKR,

[DestinationDirs]
DefaultDestDir=13
APODll_CopyFiles=13
BTDll_CopyFiles=13
IntelTraceAgentService_CopyFiles=13 , SKR
;To update with another folder

;-------------------------------------------------------------------------------
; Manufacturer and Models Section
;-------------------------------------------------------------------------------

[Manufacturer]
%INTEL% = INTEL, NTamd64.10.0...22631

[INTEL.NTamd64.10.0...22631]
%PLATFORM.DeviceDesc%  = Install_Win11_22631,SWC\VID8086_DTTTECH_1.0
%PLATFORM.DeviceDesc%  = Install_Win11_22631,SWC\VID8086_DTTTECH_0002
%PLATFORM.DeviceDesc%  = Install_Win11_22631,SWC\VID8086_DTTTECH_0003
%PLATFORM.DeviceDesc%  = Install_Win11_22631,SWC\VID8086_DTTTECH_0004

;------------------------------------------------------------------------------
; KPE_APO
;------------------------------------------------------------------------------

[Install_Win11_22631.NTamd64]
CopyFiles = CopyDriver, APODll_CopyFiles, BTDll_CopyFiles, IntelTraceAgentService_CopyFiles

[CopyDriver]
kpe_apo.sys,,,2

[APODll_CopyFiles]
APO_PROCS64.dll,,,2

[BTDll_CopyFiles]
ibtpgo64.dll,,,%COPYFLG_NOSKIP%

[IntelTraceAgentService_CopyFiles]
trace-agent.exe,,,%COPYFLG_NOSKIP%
0493b1cf-608a-4b49-b378-b54eb8b3b0c1.bin,,,%COPYFLG_NOSKIP%
1e67a31e-70f1-49a0-b26c-898831814752.bin,,,%COPYFLG_NOSKIP%
2b497056-8d91-435c-ba2a-5c7bd1df7306.bin,,,%COPYFLG_NOSKIP%
2ee08c04-2566-490e-a65c-c8b81f55bb2f.bin,,,%COPYFLG_NOSKIP%
43a729d2-f33c-4a40-bd6a-cc01968acc96.bin,,,%COPYFLG_NOSKIP%
4abcc309-253e-4b89-aba0-c0ecd9457fbb.bin,,,%COPYFLG_NOSKIP%
7573fc12-f39d-4933-8b12-e3af774b193d.bin,,,%COPYFLG_NOSKIP%
76a39119-8cd6-4fcb-ba62-e9cf0cfb7c4c.bin,,,%COPYFLG_NOSKIP%
84cf7d80-5433-4f7b-bf21-b26d07f0d76b.bin,,,%COPYFLG_NOSKIP%
a766eca2-3799-4398-aba1-ec226751fdd2.bin,,,%COPYFLG_NOSKIP%
b509fa2f-1b76-43f4-9fea-17f4b95067d3.bin,,,%COPYFLG_NOSKIP%
cfa40c92-f9ae-40e6-9554-ac4c80bf4b68.bin,,,%COPYFLG_NOSKIP%
d250b4d7-d3da-4f2a-aabe-602447465d94.bin,,,%COPYFLG_NOSKIP%
e14bb0b0-d8d7-4cd5-8fdc-f64205464eb7.bin,,,%COPYFLG_NOSKIP%
eb9ef333-6abe-431f-a629-c2f0614c906e.bin,,,%COPYFLG_NOSKIP%
rsds_218f9c2b-01ae-4e34-981a-b6a93cc4027a_1.json,,,%COPYFLG_NOSKIP%
rsds_35d34730-b7b0-45f2-a275-1777cd71ff76_1.json,,,%COPYFLG_NOSKIP%
rsds_38e88e5b-b72d-4a9e-8791-8ef8b5fc226c_1.json,,,%COPYFLG_NOSKIP%
rsds_456740e5-ba41-4b88-b353-231126bb828e_2.json,,,%COPYFLG_NOSKIP%
rsds_a2c6e341-2954-4557-baaa-5969d736b5f2_1.json,,,%COPYFLG_NOSKIP%
rsds_b0385946-e0c4-4bac-bebc-afab8fa12f51_1.json,,,%COPYFLG_NOSKIP%
rsds_c7567987-52cf-473c-bf1f-4cc321ae216f_2.json,,,%COPYFLG_NOSKIP%
rsds_da5e7e8c-de69-47c9-9707-4d0f98b728da_2.json,,,%COPYFLG_NOSKIP%
rsds_efa210c4-5b63-4543-920a-de1d24548b52_10.json,,,%COPYFLG_NOSKIP%

[Install_Win11_22631.NTamd64.Services]
AddService = kpe_apo,2,ApoKpeDriverService,, System, kpe_apo
AddService = IntelTraceAgentService,0x9F8,IntelTraceAgentService,, Application, IntelTraceAgentService

[ApoKpeDriverService]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %13%\kpe_apo.sys
LoadOrderGroup = Base

[Install_Win11_22631.NTamd64.Wdf]
KmdfService = kpe_apo, KMDFVersion

[KMDFVersion]
KmdfLibraryVersion = 1.11

[IntelTraceAgentService]
DisplayName = %IntelTraceAgentServiceDisplayName%
Description = %IntelTraceAgentServiceDescription%
ServiceType = %SERVICE_WIN32_OWN_PROCESS%
StartType = %SERVICE_AUTO_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %13%\SKR\trace-agent.exe
StartName = "NT AUTHORITY\System"
RequiredPrivileges = "SeChangeNotifyPrivilege"
;If some keys to be added add below section
AddReg = IntelTraceAgentServiceUserRegistry

[IntelTraceAgentServiceUserRegistry]
; Comment the below line to disable service recovery (up to 2x/day by default)
HKR,Parameters,"FailureActions",%REG_BINARY%,80,51,01,00,00,00,00,00,00,00,00,00,03,00,00,00,14,00,00,00,01,00,00,00,00,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKR, Parameters, TraceDownloadUrl, , "https://traces.optimize.intel.com/v1"


;----------------------------------------------------------------------
; ETW Support compontents
;----------------------------------------------------------------------

[KpeApoEtw_Install]
AddReg=KpeApoEtw_AddReg

[KpeApoEtw_AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{A23A8F10-F974-42B2-AA0E-6ADB6EB4FAC1}",,%FLG_ADDREG_TYPE_SZ%,"KpeApoEtwProvider"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{A23A8F10-F974-42B2-AA0E-6ADB6EB4FAC1}","ResourceFileName",%FLG_ADDREG_TYPE_EXPAND_SZ%,"%13%\kpe_apo.sys"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{A23A8F10-F974-42B2-AA0E-6ADB6EB4FAC1}","MessageFileName",%FLG_ADDREG_TYPE_EXPAND_SZ%,"%13%\kpe_apo.sys"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{A23A8F10-F974-42B2-AA0E-6ADB6EB4FAC1}","Enabled",%FLG_ADDREG_TYPE_DWORD%,1

[TraceAgentEtw_Install]
AddReg=TraceAgentEtw_AddReg

[TraceAgentEtw_AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{B0ECF573-A0C3-4FE5-BB74-A3F7C327C54B}",,%FLG_ADDREG_TYPE_SZ%,"IntelTraceAgentService"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{B0ECF573-A0C3-4FE5-BB74-A3F7C327C54B}","ResourceFileName",%FLG_ADDREG_TYPE_EXPAND_SZ%,"%13%\SKR\trace-agent.exe"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{B0ECF573-A0C3-4FE5-BB74-A3F7C327C54B}","MessageFileName",%FLG_ADDREG_TYPE_EXPAND_SZ%,"%13%\SKR\trace-agent.exe"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{B0ECF573-A0C3-4FE5-BB74-A3F7C327C54B}","Enabled",%FLG_ADDREG_TYPE_DWORD%,1
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog\Application\IntelTraceAgentService","EventMessageFile",%FLG_ADDREG_TYPE_EXPAND_SZ%,"%13%\SKR\trace-agent.exe"

[Install_Win11_22631.NTamd64.Events]
AddEventProvider = {A23A8F10-F974-42B2-AA0E-6ADB6EB4FAC1},KpeApoEtw_Install_Win11
AddEventProvider = {B0ECF573-A0C3-4FE5-BB74-A3F7C327C54B},TraceAgentEtw_Install_Win11

[KpeApoEtw_Install_Win11]
ProviderName = "KpeApoEtwProvider"
ResourceFile = "%13%\kpe_apo.sys"
MessageFile = "%13%\kpe_apo.sys"

[TraceAgentEtw_Install_Win11]
ProviderName = "IntelTraceAgentService"
ResourceFile = "%13%\SKR\trace-agent.exe"
MessageFile = "%13%\SKR\trace-agent.exe"

;----------------------------------------------------------------------
; Strings and Constants
;----------------------------------------------------------------------

[Strings]
SERVICE_DEMAND_START  = 3
SERVICE_KERNEL_DRIVER = 1
SERVICE_ERROR_NORMAL  = 1

FLG_ADDREG_TYPE_SZ = 0x00000000
FLG_ADDREG_TYPE_EXPAND_SZ = 0x00020000
FLG_ADDREG_TYPE_DWORD = 0x00010001

INTEL = "Intel"
DiskName = "Intel(R) Application Optimization Component"
PLATFORM.DeviceDesc = "Intel(R) Application Optimization Driver Component Extension"
IntelTraceAgentServiceDisplayName = "Intel(R) Trace Agent Service"
IntelTraceAgentServiceDescription = "Intel(R) Trace Agent Service for Application Optimization "

; Microsoft-defined constants for flags
COPYFLG_NOSKIP = 0x00000002
SERVICE_AUTO_START = 2
SERVICE_WIN32_OWN_PROCESS = 0x00000010
REG_BINARY = 0x00000001
