usbpcap
usbpcap copied to clipboard
Cleanup the WiX installer.
Most of the changes just provide modularity and whitespace but the following features have been added:
- Require separate installers for 64 and 32 bit OSes
- UI now mimics NSIS installer (including second license agreement)
- Make each file its own component (with unique GUID).
- Add VS project file (VS2013)
Thanks for your pull request! 64-bit installer worked fine on 64-bit Windows 10.
However, I noticed that x86 installer can execute on 64-bit Windows 10 and it installs 32-bit driver. This should be fixed. Also, build.bat in wix directory no longer works.
Could you please fix these two issues?
Then only thing that WiX installer is missing would be proper driver installation (unfortunately DIFxApp and DPinst doesn't seem to work well with USBPcap). I think the solution would be custom action dll that would call following functions: SetupInstallFilesFromInfSection SetupInstallServicesFromInfSection SetupInstallFromInfSection
That way it'll be able to check for errors and rollback on error. Moreover, even if rollback fails, this should still leave the USB devices working as the filter entry would be added only after files have been copied and service has been installed. The most common installation problem is that files are copied and filter is installed but the service is not. This results in USB devices not working after restart.
What's wrong with installing a x86 driver on a 64-bit Windows system? It's not recommended if there is a 64-bit equivalent, but I don't see why it should be prevented. You should have that issue on the other 64-bit OSes as well. I'm not that familiar with driver development, but I wanted to take the VS solution files farther (especially now that VS2013 is free) so that batch files weren't necessary and a solution file is all that would be needed for building USBPcap + installer and not have it be a generated afterthought as it is now. Would that be possible? (obviously as a separate patch)
(Still learning GitHub so bare with me if I make some git errors). I did a git commit --amend, which seemed to require me to do a force push, rather than have a separate commit with the changes you asked for. build.bat has been fixed and 32-bit installer no longer runs on 64-bit OS. Can you provide further details on how/why DIFxApp/DPinst isn't working? Perhaps I can fix that in another commit.
Also note that I used WiX 3.10 since it was the "latest" when I started, so I updated build.bat to reflect that. Not sure its necessary, but I didn't want to downgrade.
x86 cannot work on 64-bit Windows. x86 user-space application can, but driver cannot.
I don't really know why DIFxApp/DPinst isn't working. I couldn't get the driver to install properly when using DIFxApp/DPinst.
win10系统自己编译了下USBPcapCMD程序并使用管理员权限执行,当执行到thread.c文件的 DeviceIoControl(filter_handle, IOCTL_USBPCAP_SET_SNAPLEN_SIZE, inBuf, inBufSize, NULL, 0, &bytes_ret, 0)) ,调用失败,返回lasterror是1,请问是什么原因导致?