Set Update properties in Azure Pipeline - Advanced Installer Community
roonz11
Posts: 4
Joined: Tue Sep 01, 2020 9:57 pm

Set Update properties in Azure Pipeline

Hello Support,

I have a build task in my azure pipeline that creates a new update using the following command:

Code: Select all

NewUpdate $(InstallerName)\$(InstallerName)_$(BuildPlatform)-SetupFiles\$(InstallerName)_$(BuildPlatform).exe -name $(UpdateName)_$(version) -display_name $(UpdateName) -url $(BlobUrl)
After examining the outputed txt file I noticed that the RegistryKey is wrong and Flags are missing.
I tried adding another AI build task where I use the /UpdateInstalledDetection in the command line however this resulted in the following error:

Code: Select all

UpdateInstalledDetection $(UpdateName)_$(version) -detection_type RegKeySearch -path "HKLM\Software\WOW6432Node\$(Manufacturer)\$(Product)\Version" -expected_value $(version) -64bit
C:\hostedtoolcache\windows\advinst\17.4.0\x86\bin\x86\AdvancedInstaller.com /execute D:\a\1\s\Installer\Updater_x64.aip D:\a\_temp\202.aic
UpdateInstalledDetection Update_1.0.17.999 -detection_type RegKeySearch -path "HKLM\Software\WOW6432Node\Company\Product\Version" -expected_value 1.0.17.999 -64bit
Update not found
##[error]Failed to execute Advanced Installer task. Error: UpdateInstalledDetection Update_1.0.17.999 -detection_type RegKeySearch -path "HKLM\Software\WOW6432Node\Company\Product\Version" -expected_value 1.0.17.999 -64bit
Update not found


Can you please direct me on how I can achieve this? Can this all be done in one build step?

Thanks!
roonz11
Posts: 4
Joined: Tue Sep 01, 2020 9:57 pm

Re: Set Update properties in Azure Pipeline

I was able to get it working with one build step and simply adding a '\n' character after each command.

Code: Select all

NewUpdate $(InstallerName)\$(InstallerName)_$(BuildPlatform)-SetupFiles\$(InstallerName)_$(BuildPlatform).exe -name $(UpdateName)_$(version) -display_name $(UpdateName) -url $(BlobUrl)
UpdateInstalledDetection $(UpdateName)_$(version) -detection_type RegKeySearch -path "HKLM\Software\WOW6432Node\$(Manufacturer)\$(Product)\Version" -expected_value $(version) -64bit
UpdateInstaller ProductUpdate_$(version) -command_line "/qn" -no_elevation -install_silent
However, even though I have -no_elevation and -install_silent, they are not found in the outputed txt file.
I'm just wondering now how I can set the following properties as well?
- NoGUICommandLineSwitch = /exenoui /qn
- Flags = SilentInstall|Sys64|Advertises

Ex. updater.txt
top entry is from pipeline
second entry is from AdvancedInstaller UI
;aiu;

[Update_1.0.6.999]
Name = Product
ProductVersion = 1.0.6.999
URL = https://myinstaller.blob.core.windows.n ... er_x64.exe
Size = 76071370
ReleaseDate = 04/09/2020
SHA256 = 2B3C1EFA3BDFB04502330FA48CB4FE90EA23B10A4FF521122C72A0BA1A85FB1B
MD5 = 6aee2b16ab7a82d6781ef50dd2f1b3ec
ServerFileName = Installer_x64.exe
RegistryKey = HKLM\Software\WOW6432Node\Manufacturer\Product\Version
Version = 1.0.6.999

[Update]
Name = Product
NoGUICommandLineSwitch = /exenoui /qn
ProductVersion = 1.0.0.0
URL = https://myinstaller.blob.core.windows.n ... er_x64.exe
Size = 76071370
ServerFileName = Installer_x64.exe
Flags = SilentInstall|Sys64|Advertises
RegistryKey = HKLM\Software\WOW6432Node\Manufacturer\Product\Version
Version = 1.0.0.0
Thanks!
Last edited by roonz11 on Thu Sep 10, 2020 2:57 am, edited 1 time in total.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Set Update properties in Azure Pipeline

Hello,

The following options:

Code: Select all

-install_silent
--> "Attempt to suppress GUI or console" option from the "Update Installer" tab

Code: Select all

-no_elevation
--> "Install update without elevation" option from the "Update Installer" tab

Code: Select all

-64_bit
--> "Use 64-bit registry location" option from the "Update Installed Detection" tab

should correspond in the output txt file to this:

Flags = SilentInstall|Sys64|Advertises

If the target package is an .EXE and the "Install update without elevation" option is used, then the "No GUI command line switch" should correspond to:

NoGUICommandLineSwitch = /exenoui /qn

When building the UpdatesConfigurationProject from the command line, are these options not added to the output txt file?

Could you please proceed as it follows and let me know the outcome?

- apply the changes, but do not build

- manually open the .AIP file

- check if those options were checked (i.e. for -install_silent --> the "Attempt to suppress GUI or console" option, etc.)

Looking forward to hearing from you.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
roonz11
Posts: 4
Joined: Tue Sep 01, 2020 9:57 pm

Re: Set Update properties in Azure Pipeline

Code: Select all

UpdateInstaller ProductUpdate_$(version) -command_line "/qn" -no_elevation -install_silent
As you can see from my command, I do have -install_silent and -no_elevation but it does not produce the "NoGUICommandLneSwith" nor "Flags".
Can you tell me exactly what my command should look like?

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

Re: Set Update properties in Azure Pipeline

Hello,

Please accept my apologies for such a delayed reply.

I have tested this and I can indeed confirm that, for some unknown reason, the option ("Install update without elevation") is not set properly when the command line ("-no_elevation") is used.

I will forward this to our development team for further investigations.

Until a fix will be availalbe, I am afraid that the only way would be to manually check the required options.

However, in what regards the "Flags", this looks like it should be working as expected.

UpdateConfigCLI.png
UpdateConfigCLI.png (165.21 KiB) Viewed 3937 times


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Set Update properties in Azure Pipeline

Hello,

This issue has been fixed in version 17.6 of Advanced Installer, released on October 22nd, 2020.

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

Return to “Common Problems”