;
; Copyright (C) Microsoft. All rights reserved.
;
; tpmvsc.inf - Install the Virtual Smartcard Reader user-mode driver configured to use the simulator and TPM
;

[Version]
Signature="$Windows NT$"
Class=SmartCardReader
ClassGuid={50DD5230-BA8A-11D1-BF5D-0000F805F530}
Provider=%MSFT%
PnpLockdown=1
DriverVer = 06/21/2006,10.0.20348.2849

[Manufacturer]
%MSFT%=Microsoft,NTamd64

[Microsoft.NTamd64]
%SmartcardSimulatorDeviceName% = SmartcardSimulator_Install, VirtualSmartcardReader\reader 

[SourceDisksFiles]
VirtualSmartcardReader.dll=1

[SourceDisksNames]
1=windows cd

; ============ Add reg for all readers ===============

[Reader.Install.AddReg]
HKLM, Software\Microsoft\Cryptography\Calais\Readers,,,

[Reader.Install.AddProperty]
; reader properties
{2BEED4A8-5721-4C27-AF9A-82EC36181B4D}, 2, 18,, "%11%\smartcardsimulator.dll"

[Simulator.Install.AddProperty]
; simulator properties
{2065f23d-d989-4f8f-b769-4a3d779faf0b}, 3, 18,, "%11%\tpmvsc.dll"

; =================== UMDF TPM Smartcard Device ==================================

[SmartcardSimulator_Install.NT]
AddReg= Reader.Install.AddReg
AddProperty= Reader.Install.AddProperty
AddProperty= Simulator.Install.AddProperty
CopyFiles=SmartcardSimulatorDriver_CopyFiles
AddProperty= DriverPropertiesSection

[SmartcardSimulator_Install.NT.hw]
AddReg=SmartcardSimulator_Device_AddReg

[SmartcardSimulator_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device

[SmartcardSimulator_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[SmartcardSimulator_Install.NT.Wdf]
UmdfService=SmartcardSimulator, SmartcardSimulatorDriver_Install
UmdfServiceOrder=SmartcardSimulator
UmdfKernelModeClientPolicy=AllowKernelModeClients

; ==============================================================


[SmartcardSimulatorDriver_Install]
UmdfLibraryVersion=1.11.0
DriverCLSID={60A0C831-6E46-4f48-85DB-8914D8486E1C}
ServiceBinary=%12%\UMDF\VirtualSmartcardReader.dll

[SmartcardSimulator_Device_AddReg]
HKR,"WUDF","Exclusive",0x10001,1

[WUDFRD_ServiceInstall]
ServiceType=1 ;SERVICE_KERNEL_DRIVER
StartType=1 ;SERVICE_SYSTEM_START
ErrorControl=1 ;SERVICE_ERROR_NORMAL
ServiceBinary=%12%\WUDFRd.sys

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfCoinstaller.dll"

[DestinationDirs]
SmartcardSimulatorDriver_CopyFiles=12,UMDF ; copy to drivers\umdf

[SmartcardSimulatorDriver_CopyFiles]
VirtualSmartcardReader.dll,,,0x100

[DriverPropertiesSection]
DeviceIcon,,,,"%%SystemRoot%%\System32\SmartcardCredentialProvider.dll,-1901"

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

[Strings]
MSFT="Microsoft"
ClassName="Smartcard Readers"
SmartcardSimulatorDeviceName="Microsoft Virtual Smart Card (WUDF)"
