[Version]
Signature="$Windows NT$"
ClassGUID = {4D36E968-E325-11CE-BFC1-08002BE10318}
Class = Display
ClassVer = 2.0
Provider=%ManufacturerName%
CatalogFile=VirtualDisplayDriver.cat
DriverVer = 09/18/2025,1.0.0.14
PnpLockDown=1

[Manufacturer]
%ManufacturerName%=Standard,NTamd64.10.0...22621

[Standard.NTamd64.10.0...22621]
%DeviceName%=MyDevice_Install, Root\VirtualDisplayDriver

[SourceDisksFiles]
VirtualDisplayDriver.dll=1
VirtualDisplayService.exe=1
LenovoVirtualDisplay.exe=1
vdsetup.exe=1
Lenovo.AssemblyValidation.Native.dll=1
ThirdPartyNotices.txt=1
Licenseagreement.pdf=1

[SourceDisksNames]
1 = %DiskName%

; =================== UMDF Device ==================================

[MyDevice_Install.NT]
CopyFiles=UMDriverCopy,HsaServiceFiles
Include=WUDFRD.inf
Needs=WUDFRD.NT

[MyDevice_Install.NT.hw]
Include=WUDFRD.inf
Needs=WUDFRD.NT.HW
AddReg = MyDevice_HardwareDeviceSettings

[MyDevice_HardwareDeviceSettings]
HKR,, "UpperFilters",  %REG_MULTI_SZ%, "IndirectKmd"
HKR, "WUDF", "DeviceGroupId", %REG_SZ%, "LNVVDGroup" 
HKR,"WDF","WdfDirectedPowerTransitionEnable",0x00010001,1

[MyDevice_Install.NT.Services]
Include=WUDFRD.inf
Needs=WUDFRD.NT.Services
AddService = LenovoVirtualDisplayService,0x00000800,LnvHsa_Service

[MyDevice_Install.NT.Wdf]
UmdfService=VirtualDisplayDriver,VirtualDisplayDriver_Install
UmdfServiceOrder=VirtualDisplayDriver
UmdfKernelModeClientPolicy = AllowKernelModeClients

[VirtualDisplayDriver_Install]
UmdfLibraryVersion = 2.25.0 
ServiceBinary = %13%\VirtualDisplayDriver.dll
UmdfExtensions = IddCx0102

[LnvHsa_Service]
DisplayName     = %ServiceName%
ServiceType     = %SERVICE_OWN_PROCESS%
StartType       = %SERVICE_AUTO_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %13%\VirtualDisplayService.exe
Description     = %ServiceDescription%
AddReg=add-registry-section
FailureActions=service-failure-actions-install-section

[DestinationDirs]
UMDriverCopy=13
HsaServiceFiles=13

[UMDriverCopy]
VirtualDisplayDriver.dll

[HsaServiceFiles]
VirtualDisplayService.exe,,,0x6
LenovoVirtualDisplay.exe,,,0x6
vdsetup.exe,,,0x6
Lenovo.AssemblyValidation.Native.dll,,,0x6
ThirdPartyNotices.txt,,,0x6
Licenseagreement.pdf,,,0x6

[add-registry-section]
HKLM,"SOFTWARE\Lenovo\LenovoVirtualDisplay","FirstExtendFlg",%REG_DWORD%,0
HKLM,"SOFTWARE\Lenovo\LenovoVirtualDisplay","FirstSetDpiFlg",%REG_DWORD%,0
HKLM,"SOFTWARE\Lenovo\LenovoVirtualDisplay","Random_Value",%REG_DWORD%,0
HKLM,"SOFTWARE\Lenovo\LenovoVirtualDisplay","VirtualDisplay_Name",%REG_SZ%,0

[service-failure-actions-install-section]
ResetPeriod=36000
Action=1,6000
Action=1,6000
Action=1,6000

; =================== Generic ==================================

[Strings]
ManufacturerName="Lenovo" 
DiskName = "LenovoVirtualDisplayDriver Installation Disk"
DeviceName="Lenovo Virtual Display Driver" 
ServiceName="Lenovo Virtual Display Service"
ServiceDescription="Lenovo Virtual Display Service"

REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
REG_QWORD = 0x00010002

SERVICE_BOOT_START      = 0x0
SERVICE_SYSTEM_START    = 0x1
SERVICE_AUTO_START      = 0x2
SERVICE_DEMAND_START    = 0x3
SERVICE_DISABLED        = 0x4
SERVICE_OWN_PROCESS     = 0x10
SERVICE_KERNEL_DRIVER   = 0x1
SERVICE_ERROR_IGNORE    = 0x0
SERVICE_ERROR_NORMAL    = 0x1
SERVICE_ERROR_SEVERE    = 0x2
SERVICE_ERROR_CRITICAL  = 0x3
SPSVCINST_ASSOCSERVICE  = 0x00000002
