akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Add pre-requisite files under feature based at run time

Hi,
We have created the Bootstrapper project and we have added some pre-requisite files and MSI under the Feature-based folder, But now for automation purpose, we have to add these files at run time. for this We are trying to create one bat file which can give us the file name and location at run time and we have to integrate this file in our advanced installer project under a feature-based folder with some installation condition. So please help us to achieve this scenario.
If you have any questions regarding these, please ask.

We are waiting for your reply.

Thanks and regards.
Akshay
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
Actually, run time means before building the AIP project.

Thanks
Akshay
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Add pre-requisite files under feature based at run time

Hello Akshay,

In order to achieve what you want, you can use the "/NewPrerequisite" command.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
thanks for the reply. We have gone through this command and it is working for us. But we have set some properties to it just like the minimum and maximum version of the pre-requisite file, and install conditions. so, please suggest which command-line argument we have to pass to set this property. For more information, we have attached the screenshot of the required property. Please go through it and help us to resolve this issue.
Attachments
InstallCondition.JPG
InstallCondition.JPG (17.43 KiB) Viewed 39238 times
PrereqVersion.jpg
PrereqVersion.jpg (22.1 KiB) Viewed 39238 times
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Add pre-requisite files under feature based at run time

Hello Akshay,

Everything you need is in the article I've linked above.

In order to create a new search criteria, you can use the following:

Code: Select all

-search_type
In order to specify the min or max version, you can use the following:

Code: Select all

-minversion
or

Code: Select all

-maxversion
Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
We have gone through the link that you have shared with us and with the help of the command given in that link we are able to integrate the MSI in feature-based of the advanced installer but we are not able to set some of the properties of that pre-requisite that I have mentioned below,
1. Minimum version of pre-requisite from display section of properties page.
2. We have to set /qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR="[APPDIR]\Kernels\2020 1.3" this command under Install command lines of setup files but not able to add the double quotes used for ([APPDIR]\Kernels\2020 1.3) command in my command, so How to add the double quotes in Install command lines of setup files.
3. How to enable the checkbox of Install prerequisite based condition which is under the Install conditions of Install condition page.
4. How to enable the particular windows support, for example ( Windows 7x64) from Supported Windows versions of Install conditions page.

Now we have used this following command.
AdvancedInstaller.com /edit MyProject.aip /NewPrerequisite DirectX -type FeatureBased -prereq_path C:\Setup.msi -cmd_line "/qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR="[APPDIR]\Kernels\2020 1.3"" -target_os Win64


We have also attached the required fields screen shot from advanced installer and due to limitation of file attachments we are added fourth screen shot in another post, please go through this and help us to achieve this.


Thanks
Akshay
Attachments
InstallCondition.JPG
InstallCondition.JPG (20.51 KiB) Viewed 39196 times
doublequotes.JPG
doublequotes.JPG (29.42 KiB) Viewed 39196 times
minversion.jpg
minversion.jpg (17.64 KiB) Viewed 39196 times
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
We have attached the fourth screenshot related to the Supported particular Windows version with this post.

Thanks
Akshay
Attachments
WindowsSpport.JPG
WindowsSpport.JPG (23.74 KiB) Viewed 39196 times
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Add pre-requisite files under feature based at run time

Hi Akshay,

Please note that not all the options available in the GUI are available in the command line.
1. Minimum version of pre-requisite from display section of properties page.
I'm afraid we don't have an option available to set this parameter through the command line.


2. We have to set /qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR="[APPDIR]\Kernels\2020 1.3" this command under Install command lines of setup files but not able to add the double quotes used for ([APPDIR]\Kernels\2020 1.3) command in my command, so How to add the double quotes in Install command lines of setup files.
Any double-quote directly following a closing quote is treated as (or as part of) plain unwrapped text that is adjacent to the double-quoted group, but only one double-quote:

Code: Select all

"Tim says, ""Hi!""" will act as one parameter: Tim says, "Hi!"

So, yourcommand line should be something as:

Code: Select all

AdvancedInstaller.com /edit "C:\Users\Danut\Downloads\testing\SampleProject.aip" /NewPrerequisite "Google Talk" -type FeatureBased -prereq_path "C:\Users\Danut\Downloads\testing\googletalk-setup.exe" -search_type RegValue -search_path HKLM\Software\GoogleTalk\Version -minversion 9.0 -cmd_line """/qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR=""[APPDIR]\Kernels\2020 1.3"""""
So, the command line parameters looks like this:

-cmd_line " " "/qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR=" "[APPDIR]\Kernels\2020 1.3" " " " "

just no spaces between the double quotes ("").


3. How to enable the checkbox of Install prerequisite based condition which is under the Install conditions of Install condition page.
This option is automatically enabled when specifying the search_type parameter.


4. How to enable the particular windows support, for example ( Windows 7x64) from Supported Windows versions of Install conditions page.
I'm afraid we don't have an option available to set this parameter through the command line.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
Thanks for the reply, I still have some issues while integrating feature-based prerequisites using the command line that I have mentioned below,
1. I have to add some install prerequisite based condition, for example,
my search type is - Product version (identify by Upgrade Code),
and the search value is - {bccc7f97-0b12-4b4e-9a82-81330d20d971}
can you please help us to add these install condition using command line ?
we tried this like,

AdvancedInstaller.com /edit MyProject.aip
/NewPrerequisite DirectX -type FeatureBased
-prereq_path C:\Setup.exe -search_type UpgradeCode -search_path {bccc7f97-0b12-4b4e-9a82-81330d20d971}

but it not works for us, so please correct it give a solution for this issue.

2.Can you please give us some examples of how to add install prerequisite based condition for upgrade code and product code?

3.Is there any way or command to select particular (Windows 10 x 64) supported windows operating system of launch condition page which is under the Requirement tab.

We are waiting for your reply.
Thanks
Akshay
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Add pre-requisite files under feature based at run time

Hi Akshay,

When using ProductCode or UpgradeCode , only the value for search_type values is being changed, everything else remain the same. e.g.

Code: Select all

AdvancedInstaller.com" /edit "Sample CMD.aip" /NewPrerequisite "Google Talk" -type FeatureBased -prereq_path "C:\googletalk-setup.exe" -search_type UpgradeCode -search_path {37BA6E9D-06A2-4128-A453-56EAED632B9B} -minversion 9.0 -cmd_line """/qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR=""[APPDIR]\Kernels\2020 1.3"""""
3.Is there any way or command to select particular (Windows 10 x 64) supported windows operating system of launch condition page which is under the Requirement tab.
I'm afraid we don't have an option available to set this parameter through the command line.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi,
Thanks for the reply. We have gone through your comment and we have tried the way you suggested,
and we used the follwoing command as per your suggestion for this,

"AdvancedInstaller.com" /edit "Sample CMD.aip" /NewPrerequisite "Google Talk" -type FeatureBased -prereq_path "C:\googletalk-setup.exe" -search_type UpgradeCode -search_path {37BA6E9D-06A2-4128-A453-56EAED632B9B} -minversion 9.0 -cmd_line "/qn LICENSE_SERVER=[LICENSE_SERVER] APPDIR=""[APPDIR]\Kernels\2020 1.3""" -target_os Win64

and we get the error :- Invalid "-search_type" parameter value: "UpgradeCode".

if we replace the UpgradeCode with FileVersion then it is working fine, But we want to use UpgradeCode as search_type so please validate this scenario at your end and suggest the solution for this.


and we have another one requirement that we have to replace the old prerequisite file with new one instead of adding another one, How we can achieve this requirement?

we are are waiting for your reply.

Thanks and Regards
Akshay
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Add pre-requisite files under feature based at run time

Hi Akshay,
if we replace the UpgradeCode with FileVersion then it is working fine, But we want to use UpgradeCode as search_type so please validate this scenario at your end and suggest the solution for this.
This may happens if you are using an older version of Advanced Installer. I was testing using the 17.5 version of Advanced Installer (latest of this time).
we have another one requirement that we have to replace the old prerequisite file with new one instead of adding another one, How we can achieve this requirement?
For this you can use the UpdatePrerequisite that will update a prerequisite from your package. Note that this command line was added in the 17.3 version of Advanced Installer.

New featurs and enhancements to the existing ones are added in each version of Advnaced Installer, this is why we recommend to always use the latest version available.

Please let me know if there is anything else I can help you with.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
akshay karambale
Posts: 49
Joined: Thu May 28, 2020 8:04 am

Re: Add pre-requisite files under feature based at run time

Hi Dan,
Thanks for the reply. We need some more help from you,
1. We have one MSI package that we have integrated into the AIP project using the command line with the command that you have suggested, and we have also added search condition with the help of -search_type UpgradeCode argument in that command. But our requirement is we don't want to pass the upgrade code with this command. Is there any way or any other setting that it can get upgrade code of that MSI package by itself without passing it through command line like -search_type UpgradeCode -search_path {bccc7f97-0b12-4b4e-9a82-81330d20d971}?
Also, we have added the screenshot of that field(search string UpgradeCode) that we want to config in the AIP project, please go through it.

So please help us to achieve this requirement. We are waiting for your reply.

Thanks
Akshay
Attachments
tempsnip.png
tempsnip.png (35.6 KiB) Viewed 39002 times
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Add pre-requisite files under feature based at run time

Hello,
Is there any way or any other setting that it can get upgrade code of that MSI package by itself without passing it through command line like -search_type UpgradeCode -search_path {bccc7f97-0b12-4b4e-9a82-81330d20d971}?
When adding the prerequisite through the command lien you need to specify the UpgradeCode guid[/url]. Only from the UI, Advanced Installer can detect automatically the UpgradeCode of the MSI.

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

Return to “Common Problems”