;
;Longmai Smartcard Minidriver for an x86 and x64 based package.
;

[Version]
Signature="$Windows NT$"
Class=SmartCard
ClassGuid={990A2BD7-E738-46c7-B26F-1CF8FB9F1391}
Provider=%ProviderName%
CatalogFile=mTokenMiniDrv.cat
DriverVer=03/14/2016, %Version%
PnpLockdown=1

[Manufacturer]
%ProviderName%=Minidriver,NTamd64,NTamd64.6.3

[Minidriver.NTamd64]
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500000819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500001819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500002819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500003819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500004819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500005819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500006819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500007819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500008819000
%CardDeviceName%=Minidriver64_Install,SCFILTER\CID_006a6d546f6b656e2d500009819000

[Minidriver.NTamd64.6.3]
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500000819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500001819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500002819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500003819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500004819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500005819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500006819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500007819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500008819000
%CardDeviceName%=Minidriver64_61_Install,SCFILTER\CID_006a6d546f6b656e2d500009819000

[DefaultInstall]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

[DefaultInstall.ntamd64]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegAMDX64

[DefaultInstall.NTx86]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

[DefaultInstall.ntamd64.6.3]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegAMDX64

[DefaultInstall.NTx86.6.3]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault


[SourceDisksFiles]
mTokenMiniDrv.dll=1
mTokenMiniDrv.x64.dll=1

[SourceDisksNames]
1 = %MediaDescription%


[UMPassService_Install]
DisplayName    = %umpass.SVCDESC%     ; Friendly Name of the Service
ServiceType    = 1                    ; SERVICE_KERNEL_DRIVER
StartType      = 3                    ; SERVICE_DEMAND_START 
ErrorControl   = 1                    ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\umpass.sys
LoadOrderGroup = Extended Base

[Minidriver64_Install.NT]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegAMDX64

[Minidriver64_61_Install.NT]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegAMDX64

[Minidriver32_Install.NT]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

[Minidriver32_61_Install.NT]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

[Minidriver64_Install.NT.Services]
AddService = UMPass, 0x00000002, UMPassService_Install
 
[Minidriver32_Install.NT.Services]
AddService = UMPass, 0x00000002, UMPassService_Install

[Minidriver64_61_Install.NT.Services]
AddService = UMPass, 0x00000002, UMPassService_Install

[Minidriver32_61_Install.NT.Services]
AddService = UMPass, 0x00000002, UMPassService_Install

[amd64_CopyFiles]
%SmartCardCardModule64%


[x86_CopyFiles]
%SmartCardCardModule32%

[wow64_CopyFiles]
%SmartCardCardModule32%

[AddRegDefault]
HKLM, %SmartCardName%,"ATR",0x00000001,3b,9f,11,81,31,fe,9f,00,6a,6d,54,6f,6b,65,6e,2d,50,00,00,81,90,00,00 
HKLM, %SmartCardName%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,00,00,ff,ff,ff,00
HKLM, %SmartCardName%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName%,"80000001",0x00000000,%SmartCardCardModule%

[AddRegAMDX64]
HKLM, %SmartCardName%,"ATR",0x00000001, 3b,9f,11,81,31,fe,9f,00,6a,6d,54,6f,6b,65,6e,2d,50,00,00,81,90,00,00 
HKLM, %SmartCardName%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,00,00,ff,ff,ff,00
HKLM, %SmartCardName%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName%,"80000001",0x00000000,%SmartCardCardModule64%

[AddRegWOW64]
HKLM, %SmartCardNameWOW64%,"ATR",0x00000001, 3b,9f,11,81,31,fe,9f,00,6a,6d,54,6f,6b,65,6e,2d,50,00,00,81,90,00,00 
HKLM, %SmartCardNameWOW64%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,00,00,ff,ff,ff,00
HKLM, %SmartCardNameWOW64%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardNameWOW64%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardNameWOW64%,"80000001",0x00000000,%SmartCardCardModule32%

[DestinationDirs]
amd64_CopyFiles=10,system32
x86_CopyFiles=10,system32
wow64_CopyFiles=10,syswow64

[FriendlyName]
ScFriendlyName=%FriendlyName%


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

[Strings]
ProviderName ="Longmai"
MediaDescription="Longmai Smart Card Minidriver Installation Disk"
CardDeviceName="Longmai mToken Minidriver for Smart Card"
SmartCardName="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Longmai mToken SmartCard"
SmartCardNameWOW64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Longmai mToken SmartCard"
SmartCardCardModule="mTokenMiniDrv.dll"
SmartCardCardModule32="mTokenMiniDrv.dll"
SmartCardCardModule64="mTokenMiniDrv.x64.dll"
FriendlyName="Longmai mToken Smart Card"
AutoPlayLabel="Longmai mToken Smart Card"
umpass.SVCDESC = "Microsoft UMPass Driver"
Version="2.0.16.314"