;
;SafeNet Minidriver for an x86 and x64 based package.
;

[Version]
Signature="$Windows NT$"
Class=SmartCard
ClassGuid={990A2BD7-E738-46c7-B26F-1CF8FB9F1391}
Provider=%VendorName%
CatalogFile=SafeNet.Minidriver.cat
DriverVer=11/28/2017,9.0.54.0


[Manufacturer]
%VendorName%=Gemalto,NTamd64,NTamd64.6.1,NTx86,NTx86.6.1

[Gemalto.NTamd64]
%SCMDeviceName%=SCM64_Install,SCFILTER\CID_52057F7A-38C6-4AEC-B8F0-C48B257EA4F4
%SCMDeviceName%=SCM64_Install,SCFILTER\CID_8073C82110

[Gemalto.NTx86]
%SCMDeviceName%=SCM32_Install,SCFILTER\CID_52057f7a-38c6-4aec-b8f0-c48b257ea4f4
%SCMDeviceName%=SCM32_Install,SCFILTER\CID_8073c82110

[Gemalto.NTamd64.6.1]
%SCMDeviceName%=SCM64_61_Install,SCFILTER\CID_52057F7A-38C6-4AEC-B8F0-C48B257EA4F4
%SCMDeviceName%=SCM64_61_Install,SCFILTER\CID_8073C82110

[Gemalto.NTx86.6.1]
%SCMDeviceName%=SCM32_61_Install,SCFILTER\CID_52057f7a-38c6-4aec-b8f0-c48b257ea4f4
%SCMDeviceName%=SCM32_61_Install,SCFILTER\CID_8073c82110

[DefaultInstall]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

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

[DefaultInstall.ntamd64.6.1]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegDefault

[DefaultInstall.NTx86]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

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

[SourceDisksFiles]
eTokenMD_x64.dll=1
eTokenMD.dll=1

[SourceDisksNames]
1 = %MediaDescription%

[SCM64_Install.NT]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegDefault

[SCM64_61_Install.NT]
CopyFiles=amd64_CopyFiles
CopyFiles=wow64_CopyFiles
AddReg=AddRegWOW64
AddReg=AddRegDefault


[SCM32_Install.NT]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

[SCM32_61_Install.NT]
CopyFiles=x86_CopyFiles
AddReg=AddRegDefault

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

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

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

[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

[amd64_CopyFiles]
eTokenMD.dll, eTokenMD_x64.dll

[x86_CopyFiles]
eTokenMD.dll

[wow64_CopyFiles]
eTokenMD.dll

[AddRegWOW64]
HKLM, %SmartCardNameWOW64%,"ATR",0x00000001,3b,d5,18,00,81,31,fe,7d,80,73,c8,21,10,f4
HKLM, %SmartCardNameWOW64%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
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,%SmartCardCardModule%

HKLM, %SmartCardNameWOW64_2%,"ATR",0x00000001,3b,d5,18,00,81,31,3a,7d,80,73,c8,21,10,30
HKLM, %SmartCardNameWOW64_2%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardNameWOW64_2%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardNameWOW64_2%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardNameWOW64_2%,"80000001",0x00000000,%SmartCardCardModule%

[AddRegDefault]
HKLM, %SmartCardName%,"ATR",0x00000001,3b,d5,18,00,81,31,fe,7d,80,73,c8,21,10,f4
HKLM, %SmartCardName%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
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%

HKLM, %SmartCardName_2%,"ATR",0x00000001,3b,d5,18,00,81,31,3a,7d,80,73,c8,21,10,30
HKLM, %SmartCardName_2%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_2%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_2%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_2%,"80000001",0x00000000,%SmartCardCardModule%

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

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

[Strings]
VendorName="Gemalto"
MediaDescription="SafeNet minidriver"
SCMDeviceName="SafeNet Minidriver"
SmartCardName="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\eTokenCard/JC1.0"
SmartCardName_2="SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\eTokenCard/JC1.0b"
SmartCardNameWOW64="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\eTokenCard/JC1.0"
SmartCardNameWOW64_2="SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\eTokenCard/JC1.0b"
SmartCardCardModule="eTokenMD.dll"
umpass.SVCDESC = "Microsoft UMPass Driver"
