zarquon5
Posts: 9
Joined: Mon Jan 13, 2025 4:38 pm

Unable to determine what Advinst.exe doesn't like about my command line

To whom it may concern,

I have built an Advanced Installer script that uses a bunch of properties; I have set defaults for those properties, and if I build my installer package from within the UI, it works, building my installer executable.

But I want several of these properties to be configurable via the command line so that I can parameterize my script for different branches, versions, etc. without having to edit the script for each variant. When I run the following command line trying to set a bunch of those properties according to the documentation I've found, all I get is a popup that shows me "usage" without explaining what I am doing wrong.

Here is my command line:

"C:\Program Files (x86)\Caphyon\Advanced Installer 22.3\bin\x86\advinst.exe" /build "d:\ncs\install\SUS.aip"
/SetProperty _NCSVER_="11.7" /SetProperty _NCSFULLVER_="11.7" /SetProperty _NCSDISPVER_="11.7" /SetProperty _NCSSHORTVER_="117" /SetProperty _NCSFORMATVER_="305"

When I run this, all I get is an unhelpful popup, giving me the command line syntax, which I am trying to follow, but no indication of what it doesn't like about my command line.

Is there a way to find out what it doesn't like, and is what I'm trying to do possible?

Thanks,
/Will Sadkin
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: Unable to determine what Advinst.exe doesn't like about my command line

Hello Will and welcome to our forums,

In order to work with Advanced Installer from the command line, please note that AdvancedInstaller.com should be used, not advinst.exe.

Here is the Set Property command option + an example on how to use it.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zarquon5
Posts: 9
Joined: Mon Jan 13, 2025 4:38 pm

Re: Unable to determine what Advinst.exe doesn't like about my command line

Hi Catalin,

I had already found the page you cited and was trying to follow the example given, but it isn't working, and AdvancedInstaller.com still won't tell me what is wrong.

When I switched to using AdvancedInstaller.com vs. advinst.exe, viz:

> "c:\Program Files (x86)\Caphyon\Advanced Installer 22.3\bin\x86\AdvancedInstaller.com" /build "d:\ncs\install\SUS.aip
/SetProperty _NCSVER_="11.7" /SetProperty _NCSFULLVER_="11.7" /SetProperty _NCSDISPVER_="11.7" /SetProperty _NCSSHORTVER_="117" /SetProperty _NCSFORMATVER_="305"

all that happened was that the same output came to the cmd window, rather than a UI, with still no indication of why it is providing usage.

I will note that example cited on the page provided only shows one /SetProperty name="value" being used, so I also tried having just be one /SetProperty option , with a list of name/value pairs, e.g.

/SetProperty name1="value1" name2="value2" ...

And I also tried putting the property names in quotes as well, in both forms, and I tried taking out the inner quotes, e.g.
/SetProperty "name=value", and several other variants, but none of these worked either.

How can I figure out what it's complaining about?
Liviu
Posts: 1325
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Unable to determine what Advinst.exe doesn't like about my command line

Hello,

This is because you can only set one property at a time when using the /SetProperty command.

If you want to set multiple properties, you can use a file of commands.

Example:

Code: Select all

;aic
SetProperty TEST="TestValue"
SetProperty TEST1="TestValue1"
SetProperty TEST2="TestValue2"
Save

Code: Select all

"C:\Program Files (x86)\Caphyon\Advanced Installer 22.4\bin\x86\AdvancedInstaller.com" /execute "D:\Your Application.aip" "D:\file.aic"

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zarquon5
Posts: 9
Joined: Mon Jan 13, 2025 4:38 pm

Re: Unable to determine what Advinst.exe doesn't like about my command line

Ok, I followed the example given above, and, after changing my generation of the .aic file to have a leading utf-8 BOM encoding marker, and ensuring that the file started with the apparently required leading ;aic comment, it finally accepted the command line.

But, for anyone following along with this thread, I now realize what this does: it only edits the project file specified to apply the commands given to it, and does not subsequently then build the installer from the resulting modified project file. I could not find any commands that would allow me to then trigger the build, and the modifications to the project file are stored to disk, so the above formula is less "parameterizing the build process," and more simply "modifying the project file using a sort of API."

So (unless I'm mistaken/missed something), if you do want to parameterize a generic project file (with more than one parameter?) before building an installer with it, you have to:

  1. Make a copy of the original (template) project file,
  2. Create and then apply the command file to make modifications to the copy, using the formula above,
  3. Then run "AdvancedInstaller.com /build <parameterized project file>" as a second, separate, subsequent subprocess.

This worked for me, but I am curious: is my assessment accurate?
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: Unable to determine what Advinst.exe doesn't like about my command line

Hello,

In the "Executing a file of commands" article, we can see that we can add the "Build" at the end of the ;aic file, which will trigger the build operation of the modified AIP file.

This would get rid of the need to call AdvancedInstaller.com /build as an extra step.

Hope this helps! :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”