@@ -93,8 +93,8 @@ SPDX-License-Identifier: GPL-3.0-only
9393 <Binary Id =" CustomActions" SourceFile =" ../CustomActions/bin/x64/Release/CustomActions.dll" />
9494
9595 <!-- This will restore the original Windows drivers for devices that were forced bound. -->
96- <SetProperty Id =" RestoreDrivers " Value =" " [#usbipd.exe]" unbind --all" Sequence =" execute" Before =" RestoreDrivers " Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
97- <CustomAction Id =" RestoreDrivers " BinaryRef =" Wix4UtilCA_X64" DllEntry =" WixQuietExec" Return =" ignore" Impersonate =" no" Execute =" deferred" />
96+ <SetProperty Id =" UnbindAll " Value =" " [#usbipd.exe]" unbind --all" Sequence =" execute" Before =" UnbindAll " Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
97+ <CustomAction Id =" UnbindAll " BinaryRef =" Wix4UtilCA_X64" DllEntry =" WixQuietExec" Return =" ignore" Impersonate =" no" Execute =" deferred" />
9898
9999 <!-- This will uninstall the drivers. -->
100100 <SetProperty Id =" UninstallDrivers" Value =" [APPLICATIONFOLDER]" Sequence =" execute" Before =" UninstallDrivers" Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
@@ -114,9 +114,10 @@ SPDX-License-Identifier: GPL-3.0-only
114114
115115 <InstallExecuteSequence >
116116 <!-- Condition: usbipd.exe is installed and will be uninstalled -->
117- <Custom Action =" RestoreDrivers" After =" StopServices" Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
117+ <!-- NOTE: first make sure that no devices are using VBoxUSB, or else VBoxUSBMon does not stop -->
118+ <Custom Action =" UnbindAll" Before =" StopServices" Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
118119 <!-- Condition: usbipd.exe is installed and will be uninstalled -->
119- <Custom Action =" UninstallDrivers" After =" RestoreDrivers " Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
120+ <Custom Action =" UninstallDrivers" After =" StopServices " Condition =" (?usbipd.exe=3) AND ($usbipd.exe=2)" />
120121 <!-- Condition: usbipd.exe will be (or remains) installed -->
121122 <Custom Action =" InstallDrivers" Before =" InstallServices" Condition =" $usbipd.exe=3" />
122123 <!-- Condition: usbipd.exe will be (or remains) installed -->
0 commit comments