Skip to content

Commit

Permalink
Add silent driver install (#20)
Browse files Browse the repository at this point in the history
Required for 'winget'.
Only enabled when installing non-interactive.
  • Loading branch information
dorssel authored Jun 1, 2021
1 parent 89deaab commit ba9bbaa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
*.cat binary
*.inf text
*.sys binary
*.cer binary
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: usbipd-win
Source: https://github.com/dorssel/usbipd-win

Files: Drivers/**/*
Files: Drivers/Oracle.cer Drivers/**/*
Copyright: 2011-2020 Oracle Corporation
License: GPL-2.0-only
Binary file added Drivers/Oracle.cer
Binary file not shown.
17 changes: 17 additions & 0 deletions Installer/Drivers.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,23 @@ SPDX-License-Identifier: GPL-2.0-only
<Component>
<File Id="README.md" />
</Component>
<Component>
<File Id="Oracle.cer" />
</Component>
</DirectoryRef>

<CustomAction
Id="DriverSilentInstall"
Directory="TARGETDIR"
ExeCommand="[System64Folder]certutil.exe –addstore –f TrustedPublisher &quot;[#Oracle.cer]&quot;"
Execute="deferred"
Return="ignore"
/>

<InstallExecuteSequence>
<!-- Only on *non-interactive* *install or upgrade*. Required for 'winget' package manager. -->
<Custom Action="DriverSilentInstall" Before="MsiProcessDrivers"><![CDATA[(UILevel < 5) AND NOT Installed AND NOT REMOVE]]></Custom>
</InstallExecuteSequence>
</Fragment>
<Fragment>
<DirectoryRef Id="Drivers" FileSource="$(var.DriversDir)">
Expand Down Expand Up @@ -53,6 +69,7 @@ SPDX-License-Identifier: GPL-2.0-only
<Fragment>
<ComponentGroup Id="VBoxUSB">
<ComponentRef Id="README.md" />
<ComponentRef Id="Oracle.cer" />
<ComponentRef Id="VBoxUSB.cat" />
<ComponentRef Id="VBoxUSB.sys" />
<ComponentRef Id="VBoxUSB.inf" />
Expand Down

0 comments on commit ba9bbaa

Please sign in to comment.