Sep 202012

If the import driver wizard from Flexera InstallShield fails because of a more complex driver you can install the driver(s) with a simple custom action. When I eventually got this driver in the package without the driver wizard from Installshield, the msi did a rollback when installing. The following method worked like a charm:

  • ! This guide only works if you have signed drivers !
  1. Create a install.cmd file with the following command lines:
    @echo off 
    %WINDIR%\system32\PnPutil.exe -i -a "%programfiles(x86)%\Service_Key\Driver\ftdibus.inf" 
    %WINDIR%\system32\PnPutil.exe -i -a "%programfiles(x86)%\Service_Key\Driver\ftdiport.inf"
  2. Test the script on your test machine with the drivers.  When the message “Driver package added successfully” appears, your driver can be used for this guide.

  3. Open your ISM file in installshield.  Navigate to “Setup Design” and make a new Feature. In my example, I will name this “InstallDriver”.
  4. Change the install directory of the feature to “[INSTALLDIR]driver”.
  5. Right click on the newly made feature and choose “Component Wizard”.
  6. Choose default setting “Create components for me using the best Practices”.
  7. Check if the install folder is “[INSTALLDIR]driver”.
  8. Click “add folder” and select the folder with the driver.
  9. Select Next and Finish.
  10. Open the component wizard again and add the install.cmd to the [INSTALLDIR]-folder.
  11. Go to “Custom Actions and Sequences”.
  12. Right click on Custom Actions and choose “New EXE” – “Path referencing a directory” and namel it “install driver”. Change the following settings:
      • Working Directory: INSTALLDIR
      • Filename & Command line: “cmd.exe” /c “install.cmd”
      • In-Script Execution: Deferred Execution in System Context
      • Install Exec Sequence: After PublishFeatures
      • Install Exec Condition: Not Installed

  13. That`s it. Compile your MSI and do a test run.


  3 Responses to “Installing Device Drivers with Flexera Installshield”

  1. I am currently using IntallShield2011 to create an installer for an Windows 7 application. This application requires the installation of (various) broadband modem drivers.

    To install the aforementioned drivers I developed the following script:

    @echo off

    %WINDIR%system32PnPutil.exe -i -a “%programfiles(x86)%PTINMyConnectdriversdriversHuaweiDriverX64*.inf” > c:pnpuitlHuaweuDebug.txt 2>&1

    dir %WINDIR%system32 > c:pnpuitlHuaweuDebugPath.txt 2>&1


    Running this script in the console (with “Admin” privileges), the drivers are correctly installed, returning the following log file: pnpuitlHuaweuDebugOnCMD.txt (attached).

    To integrate this script in our installer, I configured the “Custom Actions and Sequences”, as presented in the attached file (printscreen.jpg). Since the installer runs with administration execution level, it should be able to install the drivers. Nevertheless, instead of installing the drivers, the following error is returned:

    ‘C:Windowssystem32PnPutil.exe’ is not recognized as an internal or external command,

    operable program or batch file.

    I checked the pnpuitlHuaweuDebugPath.txt file and the PnPutil.exe was not there. However, when I ran the script from the console the PnPutil.exe file was there.

    I think this is probably happening because the script is not running with admin privileges. How can I overcome this issue?

    Looking forward for your help.

    Best regards,

    • Hi André,

      Did you find the solution for this? I have the exact same problem, and I’m unable to find a solution.

      Best regards,

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>