Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8211407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:25:05+00:00 2026-06-07T10:25:05+00:00

I am using Inno Setup to create an installer for my application. The installer

  • 0

I am using Inno Setup to create an installer for my application. The installer is very basic and just copies some files. This works very well and I am happy with it.

I recently implemented USB support and need to install the USB driver from the IVI foundation for that. It is basically an exe file that has to be launched somewhere during the setup process. Until now, the user has to install the drivers separately, which is not so elegant. My first approach was this:

[Run]
Filename: "{app}\driver\IviSharedComponents_2.2.1.exe"; Description: "Install USB driver (IVI Foundation)"; Flags: postinstall skipifsilent
Filename: "{app}\driver\IviSharedComponents64_2.2.1.exe"; Description: "Install 64bit USB driver (IVI Foundation)"; Flags: postinstall skipifsilent
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: postinstall skipifsilent

This works, but the user has to select the correct bitness. The advantage here is that he can choose not to install it (in which case the application just ignores the USB functionality which is fine). What I actually want is to detect the bitness of the system automatically and run the setup process. This does not have to be in the [Run] section, although I would not have anything against it (because the user can choose not to install it).

I also found some code and tried to run it like this:

[Code]
procedure CurStepChanged (CurStep: TSetupStep);
var
   WorkingDir:   String;
   ReturnCode:   Integer;
begin    
   if (ssInstall = CurStep) then
     Log('Starting driver installation');
     WorkingDir := ExpandConstant ('{app}\driver');
     Exec ('IviSharedComponents_2.2.1.exe', '', WorkingDir, SW_SHOW, ewWaitUntilTerminated, ReturnCode);
end;

But this does not start the installation (although I can see the log entry ‘Starting driver installation’). Is there something wrong with my path? What am I doing wrong and how could I change this script to automatically select the right executable depending on the bitness?

EDIT: I used the proposed solution with the [Tasks] entry. The implementation looks like this (just for reference):

[Tasks]
Name: "install_usb"; Description: "Install USB drivers (IVI Foundation)"; GroupDescription: "External drivers:";

[Run]
Filename: "{app}\driver\IviSharedComponents_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: Not IsWin64(); Tasks: install_usb; Flags: skipifsilent
Filename: "{app}\driver\IviSharedComponents64_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: IsWin64(); Tasks: install_usb; Flags: skipifsilent

This works very well, thanks a lot for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:25:06+00:00Added an answer on June 7, 2026 at 10:25 am

    In this case, it’s best to remove the postinstall flag so it runs unconditionally at the end of the setup process (but before it says finished) and add a Check: parameter to limit it to the correct bitness:

    [Run]
    Filename: "{app}\driver\IviSharedComponents_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: Not IsWin64(); Flags: skipifsilent
    Filename: "{app}\driver\IviSharedComponents64_2.2.1.exe"; StatusMsg: "Installing USB driver (IVI Foundation)"; Check: IsWin64(); Flags: skipifsilent
    

    If you want this to be conditional, you can use a normal [Tasks] entry that prompts before the setup starts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a setup using Inno installer, during the setup, I made some lengthly
I am using inno setup to install a vb6 application and drivers. Everything works
Made an application which targets .net 4 client. Created an installer using Inno Setup
I'm using Inno Setup to create an installer for my program but I want
I have a VB6 application, the installer is compiled using INNO Setup. The installer
I am using inno setup to make a installation package for my application, and
I am using Inno Setup to make an installer for a project I am
I've been coding in Inno Setup this afternoon and I read some Pascal documentation
I'm trying to make a windows installer using Inno Setup which calls an external
I'm using Inno Setup 5.4.2 (a) to create a bootstrapper. Now I finally got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.