;
;Aktiv Co. Rutoken Minidriver for an x86 and x64 based package.  All rights reserved.
;

[Version]
Signature                = "$Windows NT$"
Class                    = SmartCard
ClassGuid                = {990A2BD7-E738-46c7-B26F-1CF8FB9F1391}
Provider                 = %OrganizationName%
CatalogFile              = rtminidrv.cat
DriverVer                = 01/28/2016,4.1.0.0

[Manufacturer]
%OrganizationName%=CommonDeviceName,NTamd64,NTamd64.6.1,NTx86,NTx86.6.1

[CommonDeviceName.NTamd64]
%MinidriverName%         = CommonDeviceName64_Install,SCFILTER\CID_5275746f6b656e20445320
%MinidriverName%         = CommonDeviceName64_Install,SCFILTER\CID_5275746f6b656e20454350
%MinidriverName%         = CommonDeviceName64_Install,SCFILTER\CID_527450494e506164202032
%MinidriverName%         = CommonDeviceName64_Install,SCFILTER\CID_5275746f6b656e4543507363

[CommonDeviceName.NTx86]
%MinidriverName%         = CommonDeviceName32_Install,SCFILTER\CID_5275746f6b656e20445320
%MinidriverName%         = CommonDeviceName32_Install,SCFILTER\CID_5275746f6b656e20454350
%MinidriverName%         = CommonDeviceName32_Install,SCFILTER\CID_527450494e506164202032
%MinidriverName%         = CommonDeviceName32_Install,SCFILTER\CID_5275746f6b656e4543507363

[CommonDeviceName.NTamd64.6.1]
%MinidriverName%         = CommonDeviceName64_61_Install,SCFILTER\CID_5275746f6b656e20445320
%MinidriverName%         = CommonDeviceName64_61_Install,SCFILTER\CID_5275746f6b656e20454350
%MinidriverName%         = CommonDeviceName64_61_Install,SCFILTER\CID_527450494e506164202032
%MinidriverName%         = CommonDeviceName64_61_Install,SCFILTER\CID_5275746f6b656e4543507363

[CommonDeviceName.NTx86.6.1]
%MinidriverName%         = CommonDeviceName32_61_Install,SCFILTER\CID_5275746f6b656e20445320
%MinidriverName%         = CommonDeviceName32_61_Install,SCFILTER\CID_5275746f6b656e20454350
%MinidriverName%         = CommonDeviceName32_61_Install,SCFILTER\CID_527450494e506164202032
%MinidriverName%         = CommonDeviceName32_61_Install,SCFILTER\CID_5275746f6b656e4543507363

[DefaultInstall]
CopyFiles                = x86_CopyFiles
AddReg                   = x86_AddReg

[DefaultUninstall]
DelFiles                 = x86_DeleteFiles
DelReg                   = x86_DeleteRegistry

[DefaultInstall.NTamd64]
CopyFiles                = amd64_CopyFiles
CopyFiles                = wow64_CopyFiles
AddReg                   = amd64_AddReg
AddReg                   = wow64_AddReg

[DefaultUninstall.NTamd64]
DelFiles                 = amd64_DeleteFiles
DelFiles                 = wow64_DeleteFiles
DelReg                   = amd64_DeleteRegistry
DelReg                   = wow64_DeleteRegistry

[DefaultInstall.NTx86]
CopyFiles                = x86_CopyFiles
AddReg                   = x86_AddReg

[DefaultUninstall.NTx86]
DelFiles                 = x86_DeleteFiles
DelReg                   = x86_DeleteRegistry

[SourceDisksFiles]
rtMiniDrv64.dll          = 1      ; same directory as the INF file
rtMiniDrv32.dll          = 1      ; same directory as the INF file

[SourceDisksNames]
1 = %MediaDescription%

[CommonDeviceName64_Install.NT]
CopyFiles                = amd64_CopyFiles
CopyFiles                = wow64_CopyFiles
AddReg                   = amd64_AddReg
AddReg                   = wow64_AddReg

[CommonDeviceName64_61_Install.NT]
CopyFiles                = amd64_CopyFiles
CopyFiles                = wow64_CopyFiles
AddReg                   = amd64_AddReg
AddReg                   = wow64_AddReg
Include                  = umpass.inf
Needs                    = UmPass
AddService               = AddService

[CommonDeviceName32_Install.NT]
CopyFiles                = x86_CopyFiles
AddReg                   = x86_AddReg

[CommonDeviceName32_61_Install.NT]
CopyFiles                = x86_CopyFiles
AddReg                   = x86_AddReg
Include                  = umpass.inf
Needs                    = UmPass
AddService               = AddService

[CommonDeviceName64_61_Install.NT.Services]
Include                  = umpass.inf
Needs                    = UmPass.Services
AddService               = UMPass, 0x00000002, UMPassService_Install

[CommonDeviceName32_61_Install.NT.Services]
Include                  = umpass.inf
Needs                    = UmPass.Services
AddService               = UMPass, 0x00000002, UMPassService_Install

[CommonDeviceName64_Install.NT.Services]
Include                  = umpass.inf
Needs                    = UmPass.Services
AddService               = UMPass, 0x00000002, UMPassService_Install

[CommonDeviceName32_Install.NT.Services]
Include                  = umpass.inf
Needs                    = UmPass.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

[CommonDeviceName64_61_Install.NT.HW]
Include                  = umpass.inf
Needs                    = UmPass.HW

[CommonDeviceName64_61_Install.NT.CoInstallers]
Include                  = umpass.inf
Needs                    = UmPass.CoInstallers


[CommonDeviceName64_61_Install.NT.Interfaces]
Include                  = umpass.inf
Needs                    = UmPass.Interfaces


[CommonDeviceName32_61_Install.NT.HW]
Include                  = umpass.inf
Needs                    = UmPass.HW

[CommonDeviceName32_61_Install.NT.CoInstallers]
Include                  = umpass.inf
Needs                    = UmPass.CoInstallers


[CommonDeviceName32_61_Install.NT.Interfaces]
Include                  = umpass.inf
Needs                    = UmPass.Interfaces


[amd64_CopyFiles]
rtMiniDrv.dll, rtMiniDrv64.dll

[x86_CopyFiles]
rtMiniDrv.dll, rtMiniDrv32.dll

[wow64_CopyFiles]
rtMiniDrv.dll, rtMiniDrv32.dll

[amd64_DeleteFiles]
rtMiniDrv.dll

[x86_DeleteFiles]
rtMiniDrv.dll

[wow64_DeleteFiles]
rtMiniDrv.dll

[amd64_AddReg]
HKLM, %SmartCardName_1%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,44,53,20,c1
HKLM, %SmartCardName_1%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_1%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_1%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_1%,"80000001",0x00000000,%SmartCardCardModule_amd64%

HKLM, %SmartCardName_2%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,45,43,50,a0
HKLM, %SmartCardName_2%,"ATRMask",0x00000001,ff,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_amd64%

HKLM, %SmartCardName_3%,"ATR",0x00000001,3B,9C,96,00,52,75,74,6F,6B,65,6E,45,43,50,73,63
HKLM, %SmartCardName_3%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_3%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_3%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_3%,"80000001",0x00000000,%SmartCardCardModule_amd64%

HKLM, %SmartCardName_4%,"ATR",0x00000001,3b,8B,01,52,74,50,49,4E,50,61,64,20,20,32,9C
HKLM, %SmartCardName_4%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_4%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_4%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_4%,"80000001",0x00000000,%SmartCardCardModule_amd64%

[x86_AddReg]
HKLM, %SmartCardName_1%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,44,53,20,c1
HKLM, %SmartCardName_1%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_1%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_1%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_1%,"80000001",0x00000000,%SmartCardCardModule_x86%

HKLM, %SmartCardName_2%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,45,43,50,a0
HKLM, %SmartCardName_2%,"ATRMask",0x00000001,ff,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_x86%

HKLM, %SmartCardName_3%,"ATR",0x00000001,3B,9C,96,00,52,75,74,6F,6B,65,6E,45,43,50,73,63
HKLM, %SmartCardName_3%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_3%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_3%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_3%,"80000001",0x00000000,%SmartCardCardModule_x86%

HKLM, %SmartCardName_4%,"ATR",0x00000001,3b,8B,01,52,74,50,49,4E,50,61,64,20,20,32,9C
HKLM, %SmartCardName_4%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardName_4%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardName_4%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardName_4%,"80000001",0x00000000,%SmartCardCardModule_x86%

[wow64_AddReg]
HKLM, %SmartCardNameWOW64_1%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,44,53,20,c1
HKLM, %SmartCardNameWOW64_1%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardNameWOW64_1%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardNameWOW64_1%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardNameWOW64_1%,"80000001",0x00000000,%SmartCardCardModule_wow64%

HKLM, %SmartCardNameWOW64_2%,"ATR",0x00000001,3b,8b,01,52,75,74,6f,6b,65,6e,20,45,43,50,a0
HKLM, %SmartCardNameWOW64_2%,"ATRMask",0x00000001,ff,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_wow64%

HKLM, %SmartCardNameWOW64_3%,"ATR",0x00000001,3B,9C,96,00,52,75,74,6F,6B,65,6E,45,43,50,73,63
HKLM, %SmartCardNameWOW64_3%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardNameWOW64_3%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardNameWOW64_3%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardNameWOW64_3%,"80000001",0x00000000,%SmartCardCardModule_wow64%

HKLM, %SmartCardNameWOW64_4%,"ATR",0x00000001,3b,8B,01,52,74,50,49,4E,50,61,64,20,20,32,9C
HKLM, %SmartCardNameWOW64_4%,"ATRMask",0x00000001,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff,ff
HKLM, %SmartCardNameWOW64_4%,"Crypto Provider",0x00000000,"Microsoft Base Smart Card Crypto Provider"
HKLM, %SmartCardNameWOW64_4%,"Smart Card Key Storage Provider",0x00000000,"Microsoft Smart Card Key Storage Provider"
HKLM, %SmartCardNameWOW64_4%,"80000001",0x00000000,%SmartCardCardModule_wow64%

[amd64_DeleteRegistry]
HKLM, %SmartCardName_1%
HKLM, %SmartCardName_2%
HKLM, %SmartCardName_3%
HKLM, %SmartCardName_4%

[x86_DeleteRegistry]
HKLM, %SmartCardName_1%
HKLM, %SmartCardName_2%
HKLM, %SmartCardName_3%
HKLM, %SmartCardName_4%

[wow64_DeleteRegistry]
HKLM, %SmartCardNameWOW64_1%
HKLM, %SmartCardNameWOW64_2%
HKLM, %SmartCardNameWOW64_3%
HKLM, %SmartCardNameWOW64_4%

[DestinationDirs]
amd64_CopyFiles=10,system32
x86_CopyFiles=10,system32
wow64_CopyFiles=10,syswow64
amd64_DeleteFiles=10,system32
x86_DeleteFiles=10,system32
wow64_DeleteFiles=10,syswow64

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

[Strings]
OrganizationName             = "Aktiv Co."
MediaDescription             = "Rutoken Smart Card Minidriver Installation Disk"
MinidriverName               = "Aktiv Co. Rutoken Minidriver"
SmartCardName_1              = "SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Rutoken ECP"
SmartCardNameWOW64_1         = "SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Rutoken ECP"
SmartCardName_2              = "SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Rutoken FKC"
SmartCardNameWOW64_2         = "SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Rutoken FKC"
SmartCardName_3              = "SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Rutoken ECP SC"
SmartCardNameWOW64_3         = "SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Rutoken ECP SC"
SmartCardName_4              = "SOFTWARE\Microsoft\Cryptography\Calais\SmartCards\Rutoken PINPAD"
SmartCardNameWOW64_4         = "SOFTWARE\Wow6432Node\Microsoft\Cryptography\Calais\SmartCards\Rutoken PINPAD"

SmartCardCardModule_amd64    = "rtMiniDrv.dll"
SmartCardCardModule_x86      = "rtMiniDrv.dll"
SmartCardCardModule_wow64    = "rtMiniDrv.dll"
umpass.SVCDESC               = "Microsoft UMPass Driver"