Automate Simple MSI Builds (Command Line) - Advanced Installer Community
89jase
Posts: 6
Joined: Wed May 28, 2014 7:19 am

Automate Simple MSI Builds (Command Line)

Hi All

Long time user first time poster.
I'm basically trying to get a really simple solution to try and save us some time. I frequently build & Rebuild multiple MSI files each day and even though Templates are good, still it's still not as fast as I want it to be. So I've been playing with Command Line options to try and semi-automate it.

I'm using a BAT File to call a project with all the constant settings enabled but no files added. I've got an .ini files for the commands that need to be for each new instance of the installer. (Adding files & Setting the package name) See below.

Code: Select all

;aic
AddFolder APPDIR\ C:\Packaging\Spatial
Rebuild
So far I've run into two issues.
1. When I rebuild the same package and try to install I get the error
Another version of this product is already installed installation of this version cannot continue to configure....etc.etc
2. I'm having trouble setting the name of the package through the command line. I've looked at /SetPackageName however it seems to be this is only for overwriting current built packages.

If someone could give me a hand on these two small issues It would be greatly appreciated.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Automate Simple MSI Builds (Command Line)

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

1. You are getting the related error because the projects you are building use the same Product Codes. Please take a look on our "Why do I receive the "Another version of this product is already installed" message?" faq. In order to avoid this behavior you should make sure that a new Product Code and Upgrade Code is generated for every new project. You can use our "Set Product Code" and "Set Property" (to set the UpgradeCode property) commands.

When you need to create an upgraded version of an existing project you should use the "Set Version" command.
2. I'm having trouble setting the name of the package through the command line. I've looked at /SetPackageName however it seems to be this is only for overwriting current built packages.
I'm afraid I don't fully understand what you are trying to achieve. Can you please give us more details about this(maybe exemplify). The /SetPackageName command can be used for changing the package name of the setup built with the .aip file specified as command parameter.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
89jase
Posts: 6
Joined: Wed May 28, 2014 7:19 am

Re: Automate Simple MSI Builds (Command Line)

Thanks Daniel.
I've sorted out Issue 1 now, Just one quick question however. With Set Product Code I need to specify a langid. (I've used the example 1033) but just interested to know what this parameter is, unable to find it in the Documentation.

As for issue number 2, I simply want to rename the 'Product Name' similar to what we would do if we would use the GUI.
Image

Actually I solved this. For anyone reading, the parameters your looking for are:

Code: Select all

SetProperty ProductName="Your Application"
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Automate Simple MSI Builds (Command Line)

Hi,

The command "SetPackageName" refers to the name of the MSI/EXE generated by Advanced Installer, it is equivalent with the name you specify in Media page,
not with the product name from Product Details page.

To set the product name from the command line you can do like this:

- define a public property in Install Parameters, set its value to the name you want
- go to Product page and set this as the name: [|MY_CUSTOM_NAME] . Assuming that your property is called MY_CUSTOM_NAME
- now in your CLI scripts you can use the command SetProperty to set another name for the package.

Please note, if you are using a commands file, the changes made from the called commands will not be saved in the project automatically. At the end of the commands file
you need to specifically call the command "SAVE", as visible in our examples.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”