How to provide an input to a batch file ran using Inno Setup installer?

skr

To install our program we need to run batch file (which installs the whole application) which prompt user with few questions and we provide answer in "yes/no" format. I am writing a script and within the script I'm calling that batch file to install the whole program. Now what I am thinking to do is hide the console during installation and provide all the answers through the script.

Martin Prikryl

The simplest solution is to modify the batch file to do what you want it to do, without asking.


If you cannot do this (e.g. if the batch file is 3rd-party) you have to redirect its input from a text file.

Create a text file with the answers (e.g. answers.txt):

y
n
y
y

Create a wrapper batch file that runs your installation batch and redirects its input from the answers file (wrapper.bat):

@echo off
install.bat < answers.txt

Install all files and let Inno Setup run the wrapper.bat:

[Files]
Source: "install.bat"; DestDir: "{app}"
Source: "wrapper.bat"; DestDir: "{app}"
Source: "answers.txt"; DestDir: "{app}"

[Run]
Filename: "{app}\wrapper.bat"; Flags: runhidden

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Command line parameters missing special characters like ! when ran via batch file from Inno Setup

From Dev

How to extract a Inno Setup Installer

From Dev

How do you execute command line tools without using batch file in Inno Setup

From Dev

Inno Setup Batch file Check for privileges using cacls fails

From Dev

Microsoft SmartScreen - suspended using Inno Setup installer?

From Dev

Create a small web installer using Inno Setup

From Dev

Creating a windows installer for python using inno setup

From Dev

Create a transparent installer using Inno Setup?

From Dev

How to get versions of files (exe's and dll's) which are included to inno setup installer exe file?

From Dev

How to Check whether required space available in the hard disk to install application using inno setup installer

From Dev

How to test using wildcards whether a file exists in Inno Setup

From Dev

Inno Setup unzip file from input user

From Dev

Inno Setup: Reading a file from installer during uninstallation

From Dev

Create Inno Setup installer using Jenkins without preinstalling on agents

From Dev

call RegQueryDWordValue to get office Excel Version using inno Setup installer

From Dev

Inno Setup: How to put the installer itself in the installed program

From Dev

How do I minimize my installer in Inno Setup?

From Dev

How to set a global environment variable from Inno Setup installer?

From Dev

Inno Setup - How to Install Windows Update Offline Installer

From Dev

Inno Setup - Installer for multiple installers

From Dev

Inno Setup - Installer for multiple installers

From Dev

Write serial number to file using Inno Setup

From Dev

Inno setup: how to replace a string in XML file?

From Dev

Inno Setup (How to get dynamically path to file)?

From Dev

Inno Setup Compiler: How to modify file content

From Dev

How to call the GetNativeSystemInfo at Inno Setup iss file?

From Dev

Using INI file to fill setup section values on inno setup

From Dev

How to support thousands of files using Inno Setup?

From Dev

How to check Internet connection using Inno Setup

Related Related

  1. 1

    Command line parameters missing special characters like ! when ran via batch file from Inno Setup

  2. 2

    How to extract a Inno Setup Installer

  3. 3

    How do you execute command line tools without using batch file in Inno Setup

  4. 4

    Inno Setup Batch file Check for privileges using cacls fails

  5. 5

    Microsoft SmartScreen - suspended using Inno Setup installer?

  6. 6

    Create a small web installer using Inno Setup

  7. 7

    Creating a windows installer for python using inno setup

  8. 8

    Create a transparent installer using Inno Setup?

  9. 9

    How to get versions of files (exe's and dll's) which are included to inno setup installer exe file?

  10. 10

    How to Check whether required space available in the hard disk to install application using inno setup installer

  11. 11

    How to test using wildcards whether a file exists in Inno Setup

  12. 12

    Inno Setup unzip file from input user

  13. 13

    Inno Setup: Reading a file from installer during uninstallation

  14. 14

    Create Inno Setup installer using Jenkins without preinstalling on agents

  15. 15

    call RegQueryDWordValue to get office Excel Version using inno Setup installer

  16. 16

    Inno Setup: How to put the installer itself in the installed program

  17. 17

    How do I minimize my installer in Inno Setup?

  18. 18

    How to set a global environment variable from Inno Setup installer?

  19. 19

    Inno Setup - How to Install Windows Update Offline Installer

  20. 20

    Inno Setup - Installer for multiple installers

  21. 21

    Inno Setup - Installer for multiple installers

  22. 22

    Write serial number to file using Inno Setup

  23. 23

    Inno setup: how to replace a string in XML file?

  24. 24

    Inno Setup (How to get dynamically path to file)?

  25. 25

    Inno Setup Compiler: How to modify file content

  26. 26

    How to call the GetNativeSystemInfo at Inno Setup iss file?

  27. 27

    Using INI file to fill setup section values on inno setup

  28. 28

    How to support thousands of files using Inno Setup?

  29. 29

    How to check Internet connection using Inno Setup

HotTag

Archive