0

I have a software. It has GUI setup for windows and CLI install.sh for linux. On execution it asks user to accept license and on acceptance it asks for installation location, key, server ip, port, and a couple more option one after the other. I want to make the installation unattended so that the user double click a file and the next step is software installed. Any suggestions, thanks in advance.

Dr. Mian
  • 3,334
  • 10
  • 45
  • 69
  • You have 2 setups for two different O/S and setup development frameworks. Split the question into two. As for the windows, you say you are using Windows-Installer and InstallShield. What project type are you using in InstallShield? InstallScript, InstallScript MSI or Basic MSI? – Christopher Painter May 10 '13 at 15:34

3 Answers3

2

The answer depends on what InstallShield project type you are using. I highly suggest Basic MSI. InstallScript custom actions are OK but don't use an InstallScript or InstallScript MSI project type.

Assuming the above, you create Secure Custom Public Properties so they can be passed at the command line. You also create custom dialogs so that the values can be entered during an interactive installation. Then you create validation custom actions that can guard against bad data in both scenarios. Finally you use the properties in Registry, INI, XML et al system changes so that they can be applied where needed for your application.

Your silent install then looks like:

msiexec /I foo.msi /qn INSTALLDIR=C:\FOO KEY=12345 SERVERIP=10.0.0.1 PORT=12345 /l*v install.log

Also be sure to understand the concept that properties aren't persisted automatically by MSI. You'll need some AppSearch/System Searches to retrieve the stored values for reuse during upgrade / patch / repair scenarios.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • I guess I am looking for something like the following because I have the installation .sh file for which I want to automate steps. http://stackoverflow.com/questions/9075478/is-there-a-way-to-input-automatically-when-running-a-shell – Dr. Mian May 12 '13 at 20:17
1

What you need is called Silent mode. Check your installation system's manual for this keyword.

Many installation systems support it - I can recommend you to use NSIS (/SILENT parameter) or Inno Setup (/SILENT, /VERYSILENT) if you did not started with creating your setup yet. These are free (open source) installation systems and they are really powerful.

Be careful with this feature - many users are confused when they click the application icon and nothing happens (no window opens).

Slappy
  • 5,250
  • 1
  • 23
  • 29
  • Thank you for clue, actually its locally developed software therefore it has no silent installation feature and thats why I am trying to make one. I will read the options you have given to see if I can automate the steps of my software installation. Thanks for quick help – Dr. Mian May 10 '13 at 13:28
0

Ok I did this using expect tool (free). Here install.sh is the file I want to execute automatically and send are my options in response to the questions it asks during installation. Let me know if any problem following this.

!/usr/local/bin/expect
spawn "./install.sh"
set timeout 2
expect {WARNING: It is strongly recommended that you install RVS as root. Do you wish to run the installer as root [Y/n]}
send "Y\r"
send "xxxxxx\r"
expect {Press enter to read the License Agreement:}
send "ENTER\r"
expect {Do you accept the License Agreement [y/N]?}
send "y\r"
expect {Where do you want to install the tools [/usr/local/pkg/RVS/v3.1a]?}
send "ENTER\r"
expect {Where do you want to create links for tools [/usr/local/bin]?}
send "ENTER\r"
expect {Where do you want to create links for libraries [usr/local/lib]}
send "ENTER\r"
expect {Which license type do you wish to use [N/f/a]?}
send "f\r"
expect {IP address:}
send "1.1.1.1\r"
expect {Port:}
send "33\r"
expect {SERVERKEY}
send "xxxxxxxxxxxx\r"
expect {Do you want to install support for GNAT Pro {6.0, 6.1, 6.4} (You need a GNAT Pro license in order to use this feature) [y/N]?}
send "y\r"
expect {Proceed with the installation [Y/n]?}
send "y\r"
spawn "rvsinfo"
interact

Dr. Mian
  • 3,334
  • 10
  • 45
  • 69