; Ibmpmdrv.inf
;
; Installation file for the "Lenovo PM Device"
;
; Copyright (C) Lenovo and IBM Corp. 2000,2017.
;

[Version]
Signature="$CHICAGO$"
Provider=%Mfg%
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
DriverVer=07/31/2017,1.67.13.12
DriverPackageDisplayName=%PackageName%
CatalogFile=ibmpmdrv.cat

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

[SourceDisksFiles]
IBMPMDRV.SYS=1,x86
IBMPMSVC.EXE=1,x86
tpinspm.dll=1,x86
LPlatSvc.exe=1,x86
ibmpmctl.exe=1
ibmpmdrv.inf=1

[SourceDisksFiles.x86]
IBMPMDRV.SYS=1,x86
IBMPMSVC.EXE=1,x86
tpinspm.dll=1,x86
LPlatSvc.exe=1,x86
ibmpmctl.exe=1
ibmpmdrv.inf=1

[SourceDisksFiles.amd64]
IBMPMDRV.SYS=1,x64
IBMPMSVC.EXE=1,x64
tpinspm.dll=1,x64
LPlatSvc.exe=1,x64
ibmpmctl.exe=1
ibmpmdrv.inf=1


;
;File list information for IBMPM driver and service
;
[ibmpm.drv]
ibmpmdrv.sys,,,%FORCE_COPY%

[ibmpm.svc]
ibmpmsvc.exe,,,%FORCE_COPY%

[tpins.dll]
tpinspm.dll,,,%FORCE_COPY%

[ibmpm.exe]
ibmpmctl.exe,,,%FORCE_COPY%

[LPlat.svc]
LPlatSvc.exe,,,%FORCE_COPY%



;
[DestinationDirs]
;DefaultDestDir   = 10
ibmpm.drv = 10,system32\drivers
ibmpm.svc = 11
tpins.dll = 11
ibmpm.exe = 11
LPlat.svc = 11

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

[ibm.Mfg]
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0268
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0168
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0055

[ibm.Mfg.NTx86]
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0268
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0168
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0055

[ibm.Mfg.NTamd64]
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0268
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0168
%ibm.DeviceDesc0% = ibmpm, ACPI\LEN0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0068
%ibm.DeviceDesc0% = ibmpm, ACPI\IBM0055

;
; General installation section
;
[ibmpm]
CopyFiles = ibmpm.drv, ibmpm.svc, tpins.dll, ibmpm.exe, LPlat.svc
AddReg = ibmpm_AddReg

[ibmpm.nt]
CopyFiles = ibmpm.drv, ibmpm.svc, tpins.dll, ibmpm.exe, LPlat.svc
DelReg = ibmpmNT_DelReg

[ibmpm.NTx86]
CopyFiles = ibmpm.drv, ibmpm.svc, tpins.dll, ibmpm.exe, LPlat.svc
DelReg = ibmpmNT_DelReg

[ibmpm.NTamd64]
CopyFiles = ibmpm.drv, ibmpm.svc, tpins.dll, ibmpm.exe, LPlat.svc
DelReg = ibmpmNT_DelReg

[ibmpm_AddReg]
HKR,,NTMPDriver,,IBMPMDRV.SYS
HKR,,DevLoader,,"*NTKERN"
HKLM,"Software\Microsoft\Windows\CurrentVersion\RunServices","IBMPMSVC",,"IBMPMSVC.EXE -HELPER"

[ibmpmNT_DelReg]
HKLM,"Software\Microsoft\Windows\CurrentVersion\Run","IBMPMSVC"

;
; Service Installation
;
[ibmpm.NT.Services]
AddService = IBMPMDRV, 0x00000002 , ibmpmdrv_Service_Inst, ibmpmdrv_EventLog_Inst
AddService = IBMPMSVC, 0x00000800, ibmpmsvc_Service_Inst, ibmpmsvc_EventLog_Inst
AddService = LPlatSvc, 0x00000800, LPlatSvc_Service_Inst, LPlatSvc_EventLog_Inst

[ibmpm.NTx86.Services]
AddService = IBMPMDRV, 0x00000002 , ibmpmdrv_Service_Inst, ibmpmdrv_EventLog_Inst
AddService = IBMPMSVC, 0x00000800, ibmpmsvc_Service_Inst, ibmpmsvc_EventLog_Inst
AddService = LPlatSvc, 0x00000800, LPlatSvc_Service_Inst, LPlatSvc_EventLog_Inst

[ibmpm.NTamd64.Services]
AddService = IBMPMDRV, 0x00000002 , ibmpmdrv_Service_Inst, ibmpmdrv_EventLog_Inst
AddService = IBMPMSVC, 0x00000800, ibmpmsvc_Service_Inst, ibmpmsvc_EventLog_Inst
AddService = LPlatSvc, 0x00000800, LPlatSvc_Service_Inst, LPlatSvc_EventLog_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


[ibmpmdrv_EventLog_Inst]
AddReg = ibmpmdrv_EventLog_AddReg

[ibmpmdrv_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\ibmpmdrv.sys"
HKR,,TypesSupported,0x00010001,7

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

[ibmpmsvc_EventLog_Inst]
AddReg = ibmpmsvc_EventLog_AddReg

[ibmpmsvc_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\ibmpmsvc.exe"
HKR,,TypesSupported,0x00010001,7

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

[LPlatSvc_EventLog_Inst]
AddReg = LPlatSvc_EventLog_AddReg

[LPlatSvc_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\LPlatSvc.exe"
HKR,,TypesSupported,0x00010001,7

;
; uninstallation section
;
[ibmpmdrv.UninstallFiles]
drivers\ibmpmdrv.sys,,,
ibmpmsvc.exe,,,
tpinspm.dll,,,
ibmpmctl.exe,,,
LPlatSvc.exe,,,
IBMPMDRV.inf,,,

[DefaultUninstall]
DelFiles = ibmpmdrv.UninstallFiles

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

[ibmpm_productreg]
HKLM,SOFTWARE\IBM\IBMPM,,
HKLM,SOFTWARE\Lenovo\ShortcutKey\AppLaunch\Ex_3B,,
HKLM,SOFTWARE\Lenovo\ShortcutKey\AppLaunch\Ex_3C,,
HKLM,SOFTWARE\Lenovo\ShortcutKey\AppLaunch\Ex_3E,,

[ibmpm_critdevreg]
HKLM,SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*len0268,,
HKLM,SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*len0168,,
HKLM,SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*len0068,,
HKLM,SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*ibm0068,,
HKLM,SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*ibm0055,,

[ibmpm_EventLog]
HKLM,SYSTEM\CurrentControlSet\Services\Eventlog\System\IBMPMDRV,,
HKLM,SYSTEM\CurrentControlSet\Services\Eventlog\System\IBMPMSVC,,
HKLM,SYSTEM\CurrentControlSet\Services\Eventlog\System\LPLATSVC,,

[ibmpm_DevReg]
ConfigFlags = 0x40,
Driver = ,
DeviceDesc = Unknown Device,
Mfg = ,
Class = Unknown,
ClassGUID = {4d36e97e-e325-11ce-bfc1-08002be10318},

[ibmpm_DevReg.nt]
ConfigFlags = 0x40,
Driver = ,
DeviceDesc = ,
Mfg = ,
Service = ,
Class = Unknown,
ClassGUID = {4d36e97e-e325-11ce-bfc1-08002be10318},

[ibmpm_DevReg.NTx86]
ConfigFlags = 0x40,
Driver = ,
DeviceDesc = ,
Mfg = ,
Service = ,
Class = Unknown,
ClassGUID = {4d36e97e-e325-11ce-bfc1-08002be10318},

[ibmpm_DevReg.NTamd64]
ConfigFlags = 0x40,
Driver = ,
DeviceDesc = ,
Mfg = ,
Service = ,
Class = Unknown,
ClassGUID = {4d36e97e-e325-11ce-bfc1-08002be10318},

[ibmpm.uninstall]
DelDriver
ModifyDevice = ibmpm_DevReg
DelReg = ibmpm_AddReg, ibmpm_productreg

[ibmpm.uninstall.nt]
DelService = IBMPMDRV, 0x00000204, ,
DelService = IBMPMSVC, 0x00000204, ,
DelService = LPLATSVC, 0x00000204, ,
StopDevice
DelDevice = System, *LEN0068
DelDriver
;ModifyDevice = ibmpm_DevReg.nt
DelReg = ibmpm_productreg, ibmpm_critdevreg, ibmpm_EventLog
DeleteFile
StartDevice

[ibmpm.uninstall.NTx86]
DelService = IBMPMDRV, 0x00000204, ,
DelService = IBMPMSVC, 0x00000204, ,
DelService = LPLATSVC, 0x00000204, ,
StopDevice
DelDevice = System, *LEN0068
DelDriver
;ModifyDevice = ibmpm_DevReg.nt
DelReg = ibmpm_productreg, ibmpm_critdevreg, ibmpm_EventLog
DeleteFile
StartDevice

[ibmpm.uninstall.NTamd64]
DelService = IBMPMDRV, 0x00000204, ,
DelService = IBMPMSVC, 0x00000204, ,
DelService = LPLATSVC, 0x00000204, ,
StopDevice
DelDevice = System, *LEN0068
DelDriver
;ModifyDevice = ibmpm_DevReg.nt
DelReg = ibmpm_productreg, ibmpm_critdevreg, ibmpm_EventLog
DeleteFile
StartDevice

[Strings]
;
; Non-Localizable Strings
;
REG_SZ         = 0x00000000
REG_MULTI_SZ   = 0x00010000
REG_EXPAND_SZ  = 0x00020000
REG_BINARY     = 0x00000001
REG_DWORD      = 0x00010001
FORCE_COPY     = 12
SERVICEROOT    = "System\CurrentControlSet\Services"
UninstKey      = "Power Management Driver"
PackageEstimatedSize = 10448
PackageVersion = "1.67.13.12"

;
; Localizable Strings
;
ibm.DeviceDesc0 = "Lenovo PM Device"
ibm.svcDesc0 = "Lenovo PM Service"
Lenovo.svcDesc1 = "Lenovo Platform Service"
DiskId1 = "lenovo Installation Disk #1 (Other)"
Mfg ="Lenovo"
PackageName = "Power Management Driver"
