prakashguru
Posts: 2
Joined: Sun Oct 10, 2021 6:09 am

Azure devops builds hung

Hi,

We integrated the advanced installer into azure devops pipeline to create exe packages those are working good till few days back. From last day onwards all the builds are failing in the packaging stage. I am guessing it is expecting some input but no idea what it was.

Any help will be greatly appreciated.

Pipeline Code,

Code: Select all

- task: AzureCLI@2
  inputs:
    azureSubscription: 'Azure DevOps'
    scriptType: 'pscore'
    scriptLocation: 'inlineScript'
    inlineScript: |
      # set environment variable for current process
      $env:AZURE_DEVOPS_EXT_PAT = $env:SYSTEM_ACCESSTOKEN
      $currentDate = "$([System.DateTime]::Now.ToString("yyyy-MMM-dd"))"

      AdvancedInstaller.com /edit .\Agent.aip /SetVersion $(WINDOWS_VERSION) 
      AdvancedInstaller.com /edit .\Agent.aip /SetProperty RELEASE_DATE=$(currentDate)
      AdvancedInstaller.com /build  '.\Agent.aip'

  displayName: "Advanced Installer Build"
  env:
    SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Build Log
Install Advanced Installer Tool Task
Starting: AdvancedInstallerTool
==============================================================================
Task : Advanced Installer Tool Installer
Description : Acquires a specific version of Advanced Installer from internet or the tools cache and adds it to the PATH. Use this task to install Advanced Installer for subsequent tasks
Version : 2.0.1
Author : Caphyon
Help :
==============================================================================
Downloading: https://www.advancedinstaller.com/downloads/updates.ini
Checking if a cached copy exists for this version...
Cache does not contains this Advanced Installer version. Will be downloaded and installed.
Downloading Advanced Installer. URL: https://www.advancedinstaller.com/downl ... dvinst.msi
Downloading: https://www.advancedinstaller.com/downl ... dvinst.msi
Extracting Advanced Installer
"C:\Windows\system32\msiexec.exe" /a "D:\a\_temp\3aee4f52-88e7-4ee3-82ec-c3b29a3550da" TARGETDIR="D:\a\_temp\AdvancedInstaller\resources" /qn /l*v "D:\a\_temp\AdvancedInstaller\advinst_install.log"
Caching Advanced Installer tool.
Caching tool: advinst 23.1.0 x86
Successfully cached Advanced Installer tool. Version 23.1
Registering Advanced Installer.
C:\hostedtoolcache\windows\advinst\23.1.0\x86\bin\x86\AdvancedInstaller.com /RegisterCI ***
Starting Advanced Installer COM server.
C:\hostedtoolcache\windows\advinst\23.1.0\x86\bin\x86\AdvancedInstaller.com /REGSERVER
Prepending PATH environment variable with directory: C:\hostedtoolcache\windows\advinst\23.1.0\x86\bin\x86
Finishing: AdvancedInstallerTool
Build Package Task
[ DefaultBuild ]
Building package: D:\a\1\s\AxAgent_v13.2.exe
Prepare build
Detecting MSI incompatible resources
Preparing files

!--- It stuck here for almost 50 mins ---!

##[error]The Operation will be canceled. The next steps may not contain expected logs.
Trusted Signing requires minimum Trusted Signing Client Tools 1.0.0 installed. Trusted Signing Client Tools will be downloaded and installed automatically.
##[error]The operation was canceled.
Finishing: Advanced Installer Build
Liviu
Posts: 1356
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Azure devops builds hung

Hello,

Thank you for bringing the issue to our attention. We greatly appreciate your feedback. I want to inform you that our development team is already aware of this issue and is actively investigating it. Rest assured that your concern is receiving the attention it deserves. We will keep you updated on the progress.

We understand the impact it has on your experience, and we are committed to delivering a resolution as quickly as possible.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Liviu
Posts: 1356
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Azure devops builds hung

Hello,

It seems the hang is related with the TrustedSigningClientTools.msi, which triggers a UAC prompt during execution.

In the meantime, as a workaround, you can add a PowerShell Script task before the Advanced Installer build task to install TrustedSigningClientTools.msi.

Below is the content of the YAML script:

Code: Select all

$url = "https://download.microsoft.com/download/6d9cb638-4d5f-438d-9f21-23f0f4405944/TrustedSigningClientTools.msi"
   $msi = "$env:TEMP\TrustedSigningClientTools.msi"
   $baseDir = "$env:ProgramData\Caphyon\Advanced Installer\TrustedSigningClientTools"
   
   Write-Host "Downloading Trusted Signing Client Tools..."
   Invoke-WebRequest -Uri $url -OutFile $msi -UseBasicParsing
   
   Write-Host "Reading product version..."
   $installer = New-Object -ComObject WindowsInstaller.Installer
   $db = $installer.GetType().InvokeMember("OpenDatabase", "InvokeMethod", $null, $installer, @($msi, 0))
   $view = $db.GetType().InvokeMember("OpenView", "InvokeMethod", $null, $db, "SELECT Value FROM Property WHERE Property='ProductVersion'")
   $view.GetType().InvokeMember("Execute", "InvokeMethod", $null, $view, $null)
   $record = $view.GetType().InvokeMember("Fetch", "InvokeMethod", $null, $view, $null)
   $version = $record.GetType().InvokeMember("StringData", "GetProperty", $null, $record, 1)
   
   [System.Runtime.Interopservices.Marshal]::ReleaseComObject($record) | Out-Null
   [System.Runtime.Interopservices.Marshal]::ReleaseComObject($view) | Out-Null
   [System.Runtime.Interopservices.Marshal]::ReleaseComObject($db) | Out-Null
   [System.Runtime.Interopservices.Marshal]::ReleaseComObject($installer) | Out-Null
   [System.GC]::Collect()
   
   if ([string]::IsNullOrEmpty($version)) { $version = "1.0.0" }
   
   $targetDir = Join-Path $baseDir $version
   New-Item -ItemType Directory -Path $targetDir -Force | Out-Null
   
   Write-Host "Installing to: $targetDir"
   $proc = Start-Process -FilePath "msiexec.exe" -ArgumentList "/a `"$msi`" /qr TARGETDIR=`"$targetDir`"" -Wait -PassThru -NoNewWindow
   
   $exitCode = $proc.ExitCode
   if ($exitCode -ne 0) {
       throw "Installation failed with exit code: $exitCode"
   }
   
   Write-Host "Installation complete"
   Remove-Item $msi -Force -ErrorAction SilentlyContinue
   
   Write-Host "##vso[task.setvariable variable=TrustedSigningToolsPath;isOutput=true;]$targetDir"
Let us know if that helped.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prakash
Posts: 3
Joined: Tue Feb 15, 2022 8:17 am

Re: Azure devops builds hung

It is working. Thanks for the support.

Looking forward to a proper solution.
Liviu
Posts: 1356
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Azure devops builds hung

You're always welcome!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Liviu
Posts: 1356
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Azure devops builds hung

Hello,

The workaround described above (the script before the build step) is no longer required, as the issue has been officially resolved in our latest release, version 23.4 (January 26, 2026).

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”