cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bill_sketchup
Level 3

Passing command line arguments to installer

I'm trying to set up a silent installer for an InstallAnywhere 2018 suite project for MacOS.  Ideally for our customers, we'd like to be able to use command line arguments to select the directory and features for installation. 

The solution seems to be -D command line argument described here and elsewhere in the docs:
https://community.flexera.com/t5/InstallAnywhere-Knowledge/Installer-Command-Line-Arguments/ta-p/3594

It took me awhile to figure it all out, but I got it set up using a response file.  Here's an example:

INSTALLER_UI=silent
INSTALLDIR=/Applications/zzzz
FEATURES=cs,de

This installs the features cs and de (language packs, actually) into the /Applications/zzzz directory.   It works.

I'm trying everything I can to make this work with command line arguments:

open ./SketchUp.app --args -i silent -D\$INSTALLDIR\$=/Applications/zzz
open ./SketchUp.app --args -i silent -DINSTALLDIR=/Applications/zzz
open ./SketchUp.app --args -i silent INSTALLDIR=/Applications/zzz
open ./SketchUp.app --args -i silent -D INSTALLDIR=/Applications/zzz
open ./SketchUp.app --args -i silent -D$INSTALLDIR$=/Applications/zzz
open ./SketchUp.app --args -i silent -D@INSTALLDIR@=/Applications/zzz

But nothing seems to work.  Has anyone had any success with this?

Labels (1)
0 Kudos
(4) Replies
Revenera_Ian
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @bill_sketchup,

Thank you for your post.

Please allow me some time to look into this issue and update you.

Thanks,

Ian

0 Kudos

Hi @bill_sketchup,

Thank you for your patience.

I tested with an installer for Windows to establish a baseline reference / starting point for troubleshooting.

I confirmed that this command runs the installer silently and sets the install location:

install.exe -i silent -DUSER_INSTALL_DIR=C:\MyTestDir

But I understand that you are installing on Mac.

From the install.app/Contents/MacOS folder, I ran:

./install -i silent -DUSER_INSTALL_DIR=/Applications/MyTestFolder

but the installer still installed to the default installation location (the default $USER_INSTALL_DIR$ location).

So my test results match yours in that it does not work; I am not sure whether the behavior that you experienced was exactly the same.

Based on these test results, you can run an installer for Mac silently, but the tests indicate that $USER_INSTALL_DIR$ cannot be set and passed from the command-line. It is quite possible that the installer does not accept any parameters besides -i silent. I understand that you would prefer not to use a response file, but you would need to use a response file, which I believe you reported works, for this to work.

Thanks,

Ian

0 Kudos

Ian,

Thank you.  Are you assuming that non-standard variables (say the FEATURES define I am using) will not work either?  

Is this going to be logged as a bug and fix, or will the documentation be updated to reflect that the command line arguments don't work on Mac?

0 Kudos

Hi Bill,

Thank you for your reply. You are welcome; I am happy to help.

Yes, you are correct--I don't expect that any InstallAnywhere variables will work, only the -i silent parameters and response files.

I submitted a Documentation Enhancement request for this issue. The request is for documentation that clarifies silent installs and response files on Mac, including this use case of passing InstallAnywhere variables as parameters. Please let me know if this request doesn't work for you.

Thanks,

Ian

0 Kudos