;===============================================
; Installation file for the "Lenovo PM Device"
; Copyright (C) Lenovo. 2019.
;================================================

[Version]
Signature="$WINDOWS NT$"
Provider=%ProviderName%
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
DriverVer=09/23/2020,1.67.17.52
DriverPackageDisplayName=%PackageName%
CatalogFile=ibmpmdrv.cat

;==========================================
; Source file information
;==========================================
[SourceDisksNames]
1 = %DiskName%,,

[SourceDisksFiles.x86]
IBMPMDRV.SYS=1,x86
PMDRVS.SYS=1,x86
IBMPMSVC.EXE=1,x86
LPlatSvc.exe=1,x86

[SourceDisksFiles.amd64]
IBMPMDRV.SYS=1,x64
PMDRVS.SYS=1,x64
IBMPMSVC.EXE=1,x64
LPlatSvc.exe=1,x64

[DestinationDirs]
pm_driver_files = 12
pm_other_files = 11

[pm_driver_files]
ibmpmdrv.sys,,,2
pmdrvs.sys,,,2

[pm_other_files]
ibmpmsvc.exe,,,2
LPlatSvc.exe,,,2

;==========================================
; Driver information
;==========================================
[Manufacturer]
%ProviderName%   = ibm.Mfg,NTx86,NTamd64

[ibm.Mfg.NTx86]
%DevDesc.IBMPMDRV% = ibmpm, ACPI\LEN0268

[ibm.Mfg.NTamd64]
%DevDesc.IBMPMDRV% = ibmpm, ACPI\LEN0268

;==========================================
; General installation section
;==========================================
[ibmpm.NTx86]
CopyFiles = pm_driver_files, pm_other_files

[ibmpm.NTamd64]
CopyFiles = pm_driver_files, pm_other_files

[ibmpm.NT.Services]
AddService = IBMPMDRV,	0x00000002, ibmpmdrv_Service_Inst
AddService = PMDRVS,	0x00000800, pmdrvs_Service_Inst
AddService = IBMPMSVC,	0x00000800, ibmpmsvc_Service_Inst
AddService = LPlatSvc,	0x00000800, LPlatSvc_Service_Inst

[ibmpm.NTx86.Services]
AddService = IBMPMDRV,	0x00000002, ibmpmdrv_Service_Inst
AddService = PMDRVS,	0x00000800, pmdrvs_Service_Inst
AddService = IBMPMSVC,	0x00000800, ibmpmsvc_Service_Inst
AddService = LPlatSvc,	0x00000800, LPlatSvc_Service_Inst

[ibmpm.NTamd64.Services]
AddService = IBMPMDRV,	0x00000002, ibmpmdrv_Service_Inst
AddService = PMDRVS,	0x00000800, pmdrvs_Service_Inst
AddService = IBMPMSVC,	0x00000800, ibmpmsvc_Service_Inst
AddService = LPlatSvc,	0x00000800, LPlatSvc_Service_Inst

[ibmpmdrv_Service_Inst]
ServiceType		= 1                  ; SERVICE_KERNEL_DRIVER
StartType		= 3                  ; SERVICE_DEMAND_START
ErrorControl	= 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup	= Pointer Port
ServiceBinary	= %12%\ibmpmdrv.sys

[pmdrvs_Service_Inst]
ServiceType		= 1                  ; SERVICE_KERNEL_DRIVER
StartType		= 1                  ; SERVICE_SYSTEM_START
ErrorControl	= 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup	= Pointer Port
ServiceBinary	= %12%\pmdrvs.sys

[ibmpmsvc_Service_Inst]
DisplayName		= %SvcDesc.IBMPMSVC%		
ServiceType		= 0x10               ; SERVICE_WIN32_OWN_PROCESS
StartType		= 2                  ; SERVICE_AUTO_START
ErrorControl	= 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup	= Pointer Port
ServiceBinary	= """"%11%\ibmpmsvc.exe""""

[LPlatSvc_Service_Inst]
DisplayName		= %SvcDesc.LPlatSvc%		
ServiceType		= 0x10                ; SERVICE_WIN32_OWN_PROCESS
StartType		= 2                   ; SERVICE_AUTO_START
ErrorControl	= 0                   ; SERVICE_ERROR_IGNORE
LoadOrderGroup	= Pointer Port
ServiceBinary	= """"%11%\LPlatSvc.exe""""

;==========================================
; Uninstall
;==========================================
[DefaultUninstall]
DelFiles = ibmpmdrv.UninstallFiles

[ibmpmdrv.UninstallFiles]
drivers\ibmpmdrv.sys,,,1
drivers\pmdrvs.sys,,,1
ibmpmsvc.exe,,,1
LPlatSvc.exe,,,1
IBMPMDRV.inf,,,1

[DefaultUninstall.Services]
DelService = IBMPMSVC,0x200
DelService = LPLATSVC,0x200
DelService = IBMPMDRV,0x200
DelService = PMDRVS,0x200

;==========================================
; Other
;==========================================
[Strings]
ProviderName ="Lenovo"
PackageName = "Power Management Driver"
DevDesc.IBMPMDRV = "Lenovo PM Device"
SvcDesc.IBMPMSVC = "Lenovo PM Service"
SvcDesc.LPlatSvc = "Lenovo Platform Service"
DiskName = "lenovo Installation Disk #1 (Other)"
