Download address: /InstDrv_plug-in
There are examples in the downloaded installation package. I successfully made an installation package in this way, but unfortunately there are the following shortcomings.
Disadvantages: you can't do the driver installation package for 64-bit systems.
2. use PnPUtil:
It's harder to use. Skip it?
3. Add a line to the section or function:
ExecWait '$SYSDIR\RUNDLL32。 Please execute SETUPAPI. DLL,InstallHinfSection default install 132 $ INSTDIR \ & lt; myinf & gt。' Information'
Where "DefaultInstall" is the default part written in inf.
Disadvantages: a considerable part of DefaultInstall is not written in inf.
4. Add:
${If} ${RunningX64}
exec wait ' " $ INSTDIR \ drivers \ DP inst 64 . exe "/c/q/sa/SW/PATH " $ INSTDIR \ drivers " '
${Else}
exec wait ' " $ INSTDIR \ drivers \ DP inst 32 . exe "/c/q/sa/SW/PATH " $ INSTDIR \ drivers " '
${EndIf}
Dpinst.exe is in WDK of Microsoft, and in Windk \ 7600.16385.1\ redist \ difx \ dinst. I think you can also download it online.
Disadvantages: Unfortunately, drivers of unknown hardware can only be displayed in the installation device manager, and virtual device drivers cannot be installed. And it seems that drivers can't be installed without digital signature.
5. Add:
${If} ${RunningX64}
exec wait ' " $ INSTDIR \ devcon \ devcon 64 . exe " install " $ INSTDIR \ XXX . INF " xxxID "
${Else}
Execwait' "$ instdir \ devcon \ devcon32.exe" Install "$INSTDIR\xxx.inf"?' xxxID '
${EndIf}
Devcon.exe also exists in Microsoft's WDK, in Windk \ 7600.16385.1\ tools \ devcon. You can also get it online.
Just enter the inf path and hardware ID. Don't know the hardware ID? Install it manually first, which can be found in the device manager.
I finally used this method. Other kinds have disadvantages more or less, but this convenience is feasible.
To uninstall, add:
Section 1 Unloading
${If} ${RunningX64}
Execwait' "$ instdir \ devcon \ devcon64.exe" Delete xxxID'
${Else}
Execwait' "$ instdir \ devcon \ devcon32.exe" Delete xxxID'
${EndIf}