4

I am trying to install drivers with Inno setup and it looks like there are (at leas) two way to do this: add DPinst.Exe to the or run rundll against the .inf file.

I know there is two different version of DPinst for x86 and x64, are there different version depending on the OS (I need to support XP, Vista and 7)

Do I need admin permission for these methods?

Which method is recommended?

Julien M
  • 628
  • 2
  • 9
  • 35

1 Answers1

4

You use the same DPInst version for all versions of the operating systems; the only distinction is 32-bit vs. 64-bit. The WDK comes with both 32-bit and 64-bit versions.

Personally, here's what I do (on InnoSetup):

[Files]
...
Source: ...\dpinst32.exe; DestDir: {#DpInstPath}; DestName: dpinst.exe; Check: not IsWin64; Flags: ignoreversion
Source: ...\dpinst64.exe; DestDir: {#DpInstPath}; DestName: dpinst.exe; Check: IsWin64; Flags: ignoreversion

Using run32dll setupapi.dll,InstallHinfSection ... is outdated and generally not recommended unless you have some very specific needs.

Ilya
  • 5,385
  • 2
  • 26
  • 55
  • How do you actually run it though? If I call dpinst.exe I get a ShellExec error. Are you able to post all relevant sections of your .iss file please? – NickG Feb 20 '15 at 12:09
  • That'll be too much effort. Make sure your path is correct, etc. InnoSetup logging can help, and if worst comes to worse, try seeing what it does with Sysinternals Process Monitor. But really, I suspect you have a typo somewhere. – Ilya Feb 21 '15 at 11:56
  • 3
    Starting in Windows 10 Version 1607 (Redstone 1), the Driver Install Frameworks (DIFx) tools are no longer included in the WDK. – Crigges Feb 05 '19 at 19:03