daynix / UsbDk

Usb Drivers Development Kit for Windows
Apache License 2.0
522 stars 142 forks source link

error on install msi #107

Open Marthianfred opened 2 years ago

Marthianfred commented 2 years ago

msi stuck on error

image

any help?

ybendito commented 2 years ago

Operating system? UsbDk version?

team-orangeBlue commented 2 years ago

Operating system? UsbDk version?

Got same issue. USBDK 22, Windows 10 21H1 x64

ybendito commented 2 years ago

Let's try to get logs from the MSI create c:\log directory from admin command line msiexec /i /L*V "C:\log\usbdk.log" let's look what we can see in usbdk.log

team-orangeBlue commented 2 years ago

Let's try to get logs from the MSI create c:\log directory from admin command line msiexec /i /L*V "C:\log\usbdk.log" let's look what we can see in usbdk.log

Here's a first-install (that magically started working) and a post-reboot. "UsbDkController" is still not a command, though. postrebootusbdk.log usbdk.log

Hallohannes123 commented 1 year ago

I have this same issue. I installed it before, wanted to reinstall it and now the installer is stuck. Any solutions?

YanVugenfirer commented 1 year ago

I have this same issue. I installed it before, wanted to reinstall it and now the installer is stuck. Any solutions?

Please provide the log and information regarding the OS.

create c:\log directory
from admin command line
msiexec /i /L*V "C:\log\usbdk.log"
let's look what we can see in usbdk.log
Hallohannes123 commented 1 year ago

Please provide the log and information regarding the OS.

I am on Windows 11 Beta Insider build. After installing my usb devices stopped working, and safe mode etc. didn't fix it. I am now resetting my pc, I'll try again afterwards and provide logs if it fails again

Hallohannes123 commented 1 year ago

After resetting windows it installed without any issues. Not sure what happened usbdk.log I created this log before USB stopped working entirely.

Hallohannes123 commented 1 year ago

In the logs it mentions

MSI (s) (5C:AC) [11:16:21:319]: SECREPAIR: New Hash Database creation complete.
MSI (s) (5C:AC) [11:16:21:328]: SECREPAIR: Failed to open the file:C:\Program for computing its hash. Error:2

This seems odd. "C:\Program" sounds like some space key confusion?

Jevon-V commented 1 year ago

I also have this problem, but in most cases, the progress bar is not moved, and then the system cannot be closed properly after executing the cancel installation (windows7 Professional sp1, usbdk1.0.22) usbdk.log

ybendito commented 1 year ago

@Jevon-V For Win7: do you have https://learn.microsoft.com/en-us/security-updates/SecurityAdvisories/2015/3033929?redirectedfrom=MSDN installed?

Jevon-V commented 1 year ago

yep, it is already installed

ybendito commented 1 year ago

@Jevon-V 1.0.21 behaves the same?

Jevon-V commented 1 year ago

ye, the effect is the same

ybendito commented 1 year ago

@Jevon-V I suggest to try manual install, see https://github.com/daynix/UsbDk/wiki/Troubleshooting-UsbDk-installation

Jevon-V commented 1 year ago

I tried to unpack the msi and manually execute the command to install it, but the effect was still the same. After canceling, the restart could not be performed normally

Jevon-V commented 1 year ago

@ybendito According to the code debugging, installation progress is stuck in m_wdfCoinstaller.PostDeviceInstall(infFilePath);

ybendito commented 1 year ago

@Jevon-V which WDF you have on your Win7 (check the version of drivers\wdf01000.sys)?

Jevon-V commented 1 year ago

@ybendito 1.11.9200.16648

ybendito commented 1 year ago

@Jevon-V Interesting. I'd expect the WDF installation should just check the version and exit. Are you able to build the UsbDkHelper.dll? If yes, I'll send you a patch to try.

Jevon-V commented 1 year ago

@ybendito yep, I can compile

ybendito commented 1 year ago

@Jevon-V 0001-UsbDkHelper-avoid-WDF-installation.patch Apply this patch and build the UsbDkHelper for your system (32 or 64), just replace it under \Program Files\UsbDk ... and retry the install using UsbDkController

ybendito commented 1 year ago

UsbDk Runtime Library>.\UsbDkController.exe -i Installing UsbDk driver UsbDk_InstallDriver install failure UsbDk driver installation failed

Jevon-V commented 1 year ago

@ybendito oh, sry, I commented before that the reason why m_wdfCoinstaller.PostDeviceInstall(infFilePath) did not block error was that there was security software left on. I just used your patch to compile and still blocked. I found that the UpperFilters of registry System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000} are usbfilter(AMD USB Filter Driver). Whether to uninstall it to install the usbdk.

ybendito commented 1 year ago

@Jevon-V In general there is no problem of coexistence among several filters. Let's try rebootRequired = true (see the note inside my patch)

Jevon-V commented 1 year ago

@ybendito \UsbDk Runtime Library>.\UsbDkController.exe -i Installing UsbDk driver UsbDk_InstallDriver UsbDk driver installation succeeded but reboot is required in order to make it functional

ybendito commented 1 year ago

@Jevon-V Sure, (see the comments in the patch) in this case the installer just creates the service and registers it in the registry, but does not renumerate the devices. Reenumeration and inclusion of UsbDk into each USB device's stack happens on reboot. If you reboot the machine after that - does the UsbDk works? (for example UsbDkController -n)

Jevon-V commented 1 year ago

yep, usbdk can be used normally, ty so much

ybendito commented 1 year ago

@Jevon-V OK, so it looks li9ke there are 2 problems on your Win7:

Jevon-V commented 1 year ago

@ybendito "UsbdkController -u" is always working properly, and "UsbdkController -i" can also run normally after rebuild UsbDkHelper.dll with rebootRequired = true.

the UsbContrtoller -n output: Enumerate USB devices Found 3 USB devices:

  1. FilterID: 2, Port: 1, ID: 0951:1666, Configs: 1, Speed: 3 USB\VID_0951&PID_1666 E0D55E55CC73E641292C229D Descriptor for configuration #0: size 32
  2. FilterID: 3, Port: 4, ID: 17ef:608d, Configs: 1, Speed: 2 USB\VID_17EF&PID_608D 4 Descriptor for configuration #0: size 34
  3. FilterID: 3, Port: 5, ID: 17ef:6099, Configs: 1, Speed: 2 USB\VID_17EF&PID_6099 5 Descriptor for configuration #0: size 34
ybendito commented 1 year ago

@Jevon-V Sorry, my mistake If you rebuild the UsbDkHelper.dll with 'rebootRequired = false', does the 'UsbDkController -i' work now?

Jevon-V commented 1 year ago

@ybendito No, it'll keep blocking

ybendito commented 1 year ago

@Jevon-V Blocking or failing?

Jevon-V commented 1 year ago

@ybendito It's mostly blocking, sometimes errors occur, and when the installation goes wrong, performing the uninstallation will also report errors

weskerty commented 3 months ago

image same?