forked from open-eid/minidriver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minidriver.wxs
113 lines (104 loc) · 6.37 KB
/
minidriver.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?xml version="1.0" encoding="utf-8"?>
<?if $(var.Platform) = "x64" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:difx="http://schemas.microsoft.com/wix/DifxAppExtension">
<Product Id="*" Name="EstEID Minidriver" UpgradeCode="346f915b-09d9-4e73-afc3-254d6dc45cc7"
Language="1033" Version="$(var.MSI_VERSION)" Manufacturer="RIA">
<Package Platform="$(var.Platform)" InstallerVersion="405" Compressed="yes" InstallScope="perMachine"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<MajorUpgrade AllowSameVersionUpgrades="yes" Schedule="afterInstallInitialize" DowngradeErrorMessage=
"A newer version of [ProductName] is already installed. If you are trying to downgrade, please uninstall the newer version first."/>
<UIRef Id="WixUI_Minimal"/>
<Property Id="SCPNPENTRY">
<RegistrySearch Id="ScPnP" Root="HKLM" Key="SOFTWARE\Policies\Microsoft\Windows\ScPnP" Name="EnableScPnP" Type="raw"/>
</Property>
<!-- detect Windows 10 -->
<Property Id="USER32VERSION">
<DirectorySearch Id="SystemFolderDriverVersion" Path="[SystemFolder]">
<FileSearch Name="user32.dll" MinVersion="10.0.0.0"/>
</DirectorySearch>
</Property>
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="RemoveMinidriverRegistrationComponentX86" Guid="4EEC213A-7D2C-4062-9EEF-BA18BFEB7F12" Win64="no" Transitive="yes">
<?include minidriver.wxi?>
</Component>
<?if $(var.Platform) = "x64" ?>
<Component Id="RemoveMinidriverRegistrationComponentX64" Guid="B0DFF274-B96A-48f1-89F1-400A271770DB" Win64="yes" Transitive="yes">
<?include minidriver.wxi?>
</Component>
<Component Id="EnableScPnP64" Guid="484e65f4-fb21-49a0-8d26-54f8773ef7bf">
<Condition><![CDATA[SCPNPENTRY = "#0"]]></Condition>
<RegistryValue Root="HKLM" Key="SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\ScPnP"
Name="EnableScPnP" Action="write" Type="integer" Value="1"/>
</Component>
<?endif ?>
<Component Id="EnableScPnP32" Guid="4aac3a1c-2103-4e33-bcbf-8c354e7a8883">
<Condition><![CDATA[SCPNPENTRY = "#0"]]></Condition>
<RegistryValue Root="HKLM" Key="SOFTWARE\Policies\Microsoft\Windows\ScPnP"
Name="EnableScPnP" Action="write" Type="integer" Value="1"/>
</Component>
<!-- Restart Smart Card service, to enable upper filter "atrfiltr" -->
<Component Id="SCardSvrStart" Guid="{0AFDDA6E-A145-40B6-8ABD-FE502FD9C31D}" KeyPath="yes">
<ServiceControl Id="SCardSvrStart" Name="SCardSvr" Start="both" Stop="both" Wait="no"/>
</Component>
<Component Id="CertPropSvcStart" Guid="{4BF6CF46-3AC5-4B5A-A698-6B7BB0584800}" KeyPath="yes">
<ServiceControl Id="CertPropSvcStart" Name="CertPropSvc" Start="install" Stop="both" Wait="no"/>
</Component>
<Directory Id='$(var.PlatformProgramFilesFolder)'>
<Directory Id="APPLICATIONFOLDER" Name="EstEID Minidriver">
<Component Id="miniDriverPreW10" Guid="2518d5aa-abbe-4abf-b2f9-d56cb66b855d">
<Condition><![CDATA[(NOT USER32VERSION)]]></Condition>
<File Id="esteidcmINFPreW10" Source="minidriver\PreW10\esteidcm.inf" KeyPath="yes"/>
<File Id="esteidcmCATPreW10" Source="minidriver\PreW10\esteidcm.cat" />
<File Id="esteidcm64CATPreW10" Source="minidriver\PreW10\esteidcm64.cat" />
<File Id="esteidcm64DLLPreW10" Source="minidriver\PreW10\esteidcm_64.dll" />
<File Id="atrfiltr64DLLPreW10" Source="minidriver\PreW10\atrfiltr_64.sys" />
<File Id="esteidcm86DLLPreW10" Source="minidriver\PreW10\esteidcm_32.dll" />
<File Id="atrfiltr86DLLPreW10" Source="minidriver\PreW10\atrfiltr_32.sys" />
<difx:Driver PlugAndPlayPrompt="no" ForceInstall="yes"/>
</Component>
<Component Id="miniDriverW10" Guid="b862d285-abe9-4f3d-a057-59542496d27a">
<Condition><![CDATA[(USER32VERSION)]]></Condition>
<File Id="esteidcmINFW10" Source="minidriver\W10\esteidcm.inf" KeyPath="yes"/>
<File Id="esteidcmCATW10" Source="minidriver\W10\esteidcm.cat" />
<File Id="esteidcm64CATW10" Source="minidriver\W10\esteidcm64.cat" />
<File Id="esteidcm64DLLW10" Source="minidriver\W10\esteidcm_64.dll" />
<File Id="atrfiltr64DLLW10" Source="minidriver\W10\atrfiltr_64.sys" />
<File Id="esteidcm86DLLW10" Source="minidriver\W10\esteidcm_32.dll" />
<File Id="atrfiltr86DLLW10" Source="minidriver\W10\atrfiltr_32.sys" />
<difx:Driver PlugAndPlayPrompt="no" ForceInstall="yes"/>
</Component>
</Directory>
</Directory>
</Directory>
<!-- Enable Smart Card service, Windows 8/8.1/10 it is disabled by default, when no reader is connected -->
<CustomAction Id="EnableScSrv" Directory="APPLICATIONFOLDER" Execute="deferred" Impersonate="no" HideTarget="yes" Return="ignore"
ExeCommand='[SystemFolder]\\cmd.exe /c "sc config SCardSvr start= auto"' />
<InstallExecuteSequence>
<Custom Action="EnableScSrv" Before="StartServices">NOT Installed</Custom>
</InstallExecuteSequence>
<?if $(var.Platform) = "x64" ?>
<!-- Force install on X64 Windows. "on demand" install smartcard driver does not work on Terminals. X32 has side effects with WIX burn -->
<CustomAction Id="InstallMinidriver" Directory="APPLICATIONFOLDER" Execute="deferred" Impersonate="no" HideTarget="yes" Return="ignore"
ExeCommand="rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 [APPLICATIONFOLDER]\\esteidcm.inf" />
<InstallExecuteSequence>
<Custom Action="InstallMinidriver" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
<?endif ?>
<Feature Id="minidriver" Title="Estonian Minidriver">
<ComponentRef Id="miniDriverPreW10"/>
<ComponentRef Id="miniDriverW10"/>
<?if $(var.Platform) = "x64" ?>
<ComponentRef Id="RemoveMinidriverRegistrationComponentX64"/>
<ComponentRef Id="EnableScPnP64"/>
<?endif ?>
<ComponentRef Id="RemoveMinidriverRegistrationComponentX86"/>
<ComponentRef Id="EnableScPnP32"/>
<ComponentRef Id="SCardSvrStart"/>
<ComponentRef Id="CertPropSvcStart"/>
</Feature>
</Product>
</Wix>