kmatt
Posts: 2
Joined: Tue Jul 02, 2013 8:57 pm

How to change launch condition with command line parameter

I would like to be able to use a command line parameter to change a system launch condition - specifically the one to prevent installation on virtual machines. In other words, I want the install to fail if the machine is a virtual machine - but to be able to disable this condition with a command line parameter (we do our internal testing on virtual machines but do not want users installing on them). Is this possible?
Thanks in advance!
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to change launch condition with command line paramet

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

Unfortunately you cannot change the launch condition from the command line(e.g. to prevent the installation on a virtual machine).

As a workaround you can have another install parameter which can be changed from command line in order to allow testing on a virtual machine.
In order to achieve that you can go in the “Install Parameters” page and in the “Properties” label create a property (e.g. FORCE_VIRTUAL to a default value False ).

Now, you can go in the “Table Editor” page, in the “LaunchCondition” table and edit the NOT AI_INSIDEVM2 condition to the new one which take into consideration your previously defined property.
Example:

Code: Select all

(NOT AI_INSIDEVM2) OR  (NOT FORCE_VIRTUAL = "False")
So, any other value than False for the FORCE_VIRTUAL property will result in a false launch condition and the application can be launched in a virtual machine for testing.

You can also take a look on our Set Property Command article which may be useful to you.

Let us know if that helped otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”