hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Why does this change my installer type to exe?

Hi,
in my CI/CD process, i change the required version number in the *.aip file to the version that is available on the CI/CD system. To achieve this, I use the following command lines:

Code: Select all

advinst /edit ..\DBM_Setup.aip /UpdatePrerequisite "Visual C++ Redistributable for Visual Studio 2015-2022 x86" -minversion 14.42.34433 -prereq_path ..\Prerequisites\Visual_C++_Redistributable_for_Visual_Studio_2015-2022\VC_redist.x86.exe -search_type RegValue -search_path "HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\Version"

advinst /edit "C:\Src\hsc\DBM\DBM_Setup.aip" /UpdatePrerequisite "Visual C++ Redistributable for Visual Studio 2015-2022 x86" -minversion 14.42.34433 -prereq_path "C:\Src\hsc\DBM\Prerequisites\Visual_C++_Redistributable_for_Visual_Studio_2015-2022\VC_redist.x86.exe" -search_type FileVersion -search_path "[SystemFolder]vcruntime140.dll"
This recently started to change the installer type from msi to exe (happens with both command lines). I first observed the problem with AI 23.0 but it happens with 23.2 as well. The last time I saw it work correctly was beginning of March 2025, unfortunately I don't know the AI version.

Any help would be appreciated.

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

Re: Why does this change my installer type to exe?

Hello Hans,

I have tested this and can confirm the behavior.

Unfortunately, I can't say for sure why this is happening. Please allow me some more time to discuss this with my team and I'll followup as soon as I'll have more information.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Re: Why does this change my installer type to exe?

Hi Catalin, thank you for looking into this. I am looking forward to the follow-up!

Best, Hans
Catalin
Posts: 7606
Joined: Wed Jun 13, 2018 7:49 am

Re: Why does this change my installer type to exe?

Hello Hans,

After further investigating this, I can confirm that this looks to be a bug.

I have already forwarded this to our dev team so it can be fixed in a future version of Advanced Installer.

In the meantime, we could try to change the output type to MSI after running this command by using PowerShell.

This could look something as it follows:

Code: Select all

$advinst = new-object -comobject AdvancedInstaller
$proj = $advinst.LoadProject("C:\Users\Catalin\Documents\Advanced Installer\Projects\Your Application\Your Application.aip")
& "C:\Program Files (x86)\Caphyon\Advanced Installer 23.1\bin\x86\AdvancedInstaller.com" `
    /edit "C:\Users\Catalin\Documents\Advanced Installer\Projects\Your Application\Your Application.aip" `
    /UpdatePrerequisite "Visual C++ Redistributable for Visual Studio 2015-2022 x86" `
    -minversion 14.42.34433 `
    -prereq_path "C:\Users\Catalin\Documents\Advanced Installer\Projects\Your Application\Prerequisites\Visual C++ Redistributable for Visual Studio 2015-2022\VC_redist.x86.exe" `
    -search_type RegValue `
    -search_path "HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\Version"

$builds = $proj.BuildComponent.Builds
$builds[0].PackageType = "SingleMsi"

$proj.save()
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Re: Why does this change my installer type to exe?

Hello Catalin, thanks for the workaround. Unfortunately it didn't work for me. This may be because I have two configurations in my aip project, or maybe a SaveProject call should be inserted into the script (but there seems to be no SaveProject function).

This is the script which I am using (mostly from your suggestion):

Code: Select all

$advinst = new-object -comobject AdvancedInstaller
$proj = $advinst.LoadProject("C:\Src\hsc\DBM\DBM_Setup.aip")
$builds = $proj.BuildComponent.Builds
"Original"
$builds | Select-Object -Property Name, PackageType
& "C:\Program Files (x86)\Caphyon\Advanced Installer 23.2\bin\x86\AdvancedInstaller.com" `
    /edit "C:\Src\hsc\DBM\DBM_Setup.aip" `
    /UpdatePrerequisite "Visual C++ Redistributable for Visual Studio 2015-2022 x86" `
    -minversion 14.42.34433 `
    -prereq_path "C:\Src\hsc\DBM\Prerequisites\Visual_C++_Redistributable_for_Visual_Studio_2015-2022\VC_redist.x86.exe" `
    -search_type RegValue `
    -search_path "HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum\Version"
"`nAfter /edit"
$proj = $advinst.LoadProject("C:\Src\hsc\DBM\DBM_Setup.aip")
$builds = $proj.BuildComponent.Builds
$builds | Select-Object -Property Name, PackageType
$builds[1].PackageType="SingleMsi"
"`nFinal"
$proj = $advinst.LoadProject("C:\Src\hsc\DBM\DBM_Setup.aip")
$builds = $proj.BuildComponent.Builds
$builds | Select-Object -Property Name, PackageType
And this is the output:

Code: Select all

Original

Name          PackageType
----          -----------
EXE_Installer SingleExe  
MSI_Installer SingleMsi  

After /edit
EXE_Installer SingleExe  
MSI_Installer SingleExe  

Final
EXE_Installer SingleExe  
MSI_Installer SingleExe  
When I load the project into AdvnacedInstaller, both configurations are displayed as "single exe" in accordance to the script output.

Best
Hans
Catalin
Posts: 7606
Joined: Wed Jun 13, 2018 7:49 am

Re: Why does this change my installer type to exe?

Hey Hans,
This may be because I have two configurations in my aip project, or maybe a SaveProject call should be inserted into the script (but there seems to be no SaveProject function).
You should be able to save the project by using $proj.Save(), like I did in the example code I provided the first time.

Does that not work for you?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Re: Why does this change my installer type to exe?

Hello Catalin, sorry, that was my fault. The "Save" line in your sample code line was scrolled out of view...

I integrated the workaround in our CI/CD pipeline, and after some fighting against msbuild and PowerShell syntax, I can say that it now works :)
Can you please add a message to this thread when the problem is finally fixed so that I can remove the workaround?

Thanks a lot
Hans
Catalin
Posts: 7606
Joined: Wed Jun 13, 2018 7:49 am

Re: Why does this change my installer type to exe?

Hello Hans,

I'm glad to hear everything is working as expected now. :)

And sure thing, I will update this thread once this will be fixed on our end.

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

Re: Why does this change my installer type to exe?

Hello Hans,

This has been fixed in our latest release, 23.3.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Re: Why does this change my installer type to exe?

Hi Catalin,

thank you for the notice. I will test it as soon as I find a time slot... probably only next year!

Cheers
Hans
Catalin
Posts: 7606
Joined: Wed Jun 13, 2018 7:49 am

Re: Why does this change my installer type to exe?

You are always welcome, Hans!

Regarding the testing, sure, it can definitely wait until next year. :)

Wishing you happy holidays!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 109
Joined: Wed Mar 02, 2016 2:55 pm

Re: Why does this change my installer type to exe?

Hello Catalin, happy New Year! I removed the workaround and can now confirm that the problem is gone and AI works as expected. Thank you once more for your help!

Cheers, Hans
Catalin
Posts: 7606
Joined: Wed Jun 13, 2018 7:49 am

Re: Why does this change my installer type to exe?

Hello Hans,

Wishing you a Happy New Year, too! :)

Glad to hear everything is working as expected now.

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

Return to “Common Problems”