Sim
Posts: 3
Joined: Mon Aug 10, 2015 8:33 pm

Creating Prerequisite with command line

Hi,

I was wondering if there was a way to set the properties and install conditions of a prerequisite with only command line. My goal is to have the prerequisite always install and to not continue to the main installation if the prerequisite was not installed.

Another question is there a way to change the file path of the prerequisite?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hello and welcome to Advanced Installer forums,

You can use the New Prerequisite command to add a new prerequisite for your package. Its equivalent UI option is the [ New... ] button from Prerequisites page.

You can also take a look on the Add Prerequisites article which may be useful to you.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sim
Posts: 3
Joined: Mon Aug 10, 2015 8:33 pm

Re: Creating Prerequisite with command line

Hi again,

After reading the two links you have suggested me to read, I found no section expanding on how to edit prerequisites but only on how to add them. I should have also added to the second question that I am looking for a way to use a command line to change the file path.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hello,

Indeed, we don't have an edit prerequisite command line. This seems to be an Advanced Installer limitation. We will consider adding this improvement in a future version of Advanced Installer. Thank you for your suggestion.
The workaround would be to remove the prerequisite and add it once again but changing the prereq_path attribute.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sim
Posts: 3
Joined: Mon Aug 10, 2015 8:33 pm

Re: Creating Prerequisite with command line

Hi again,

Thanks for the quick response, what would you suggest for having the prerequisite always install through command line? Should I add in a statement that is always false? or is there a easier way.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hello,

It seems that the search_type and search_path are mandatory attributes for the New Prerequisite Option.
Should I add in a statement that is always false?
If you will add an incorrect install condition for the prerequisite, you might get the 4154 warning. So this is not a recommended approach.

Adding a prerequisite from command line with the always install as an install condition is not possible at this time. This seems to be an Advanced Installer limitation. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hello,

The /NewPrerequisite - "always install" as an install condition was added in version 12.5 of Advanced Installer released on October 21st, 2015.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidholsgrove
Posts: 6
Joined: Mon Mar 23, 2015 5:46 am

Re: Creating Prerequisite with command line

Hi Dan,

Whats the new cmd line parameter to use the 'always install' condition on a prerequisite? I've got 12.5 installed, and these are the valid options on the cmd line;

Advanced Installer 12.5

Usage:
AdvancedInstaller.com <path_to_project_file>
AdvancedInstaller.com /help [<command>] | /? [<command>]
AdvancedInstaller.com /build <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] } [-force]
AdvancedInstaller.com /rebuild <path_to_project_file> { [-buildslist <builds_list>] | [-configurationslist <configurations_list>] }
AdvancedInstaller.com /edit <path_to_project_file> <command>
AdvancedInstaller.com /execute <path_to_project_file> <command_file_path> [-nofail]
AdvancedInstaller.com /loadpathvars <path_variables_file_path>
AdvancedInstaller.com /newproject <path_to_project_file> [-type project_type] [-lang project_language] [-overwrite]
AdvancedInstaller.com /register <license_id>
AdvancedInstaller.com /registerfloating <host>:<port>
AdvancedInstaller.com /cfglicensesrvproxy [-set <host>:<port>] | [-disable]

NewPrerequisite command:
/NewPrerequisite <display_name> [-builds <builds_list>] [-package] [-force_install] [-lzma_compresion] -prereq_type <FileBased|UrlBased|OpenSite> -prereq_path <prereq_path> [-extract_folder <extract_folder>] [-aditionalfiles <aditional_files>] [-size <prereq_file_size>] [-md5 <prereq_file_md5>] [-cmd_line <cmd_line>] [-target_os <WinNT|Win64>] [-search_type <FileVersion|RegSubKeyEnum|RegValue>] [-search_path <search_path>] [-search_depth <search_depth>] [-minversion <minimum_version>] [-maxversion <maximum_version>] [-64bit]

thanks
david
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hi David,

I apologize for my delayed reply. We had two days off here due to a national holiday.

To add a prerequisite to always install, exclude the install condition switches and the prerequisite will be added automatically to always install as an install condition. e.g.

Code: Select all

C:\Program Files (x86)\Caphyon\Advanced Installer 12.5.1\bin\x86>AdvancedInstaller.com /edit "C:\Sample.aip" /NewPrerequisite DirectX -package -prereq_type FileBased -prereq_path "C:\DirectX.exe"
Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Creating Prerequisite with command line

Hello,

The Update prerequisite command line support has been added in version 13.0 of Advanced Installer released on June 2nd, 2016.

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

Return to “Building Installers”