How to get the MSI file in Post-Build event - Advanced Installer Community
cwollenhaupt
Posts: 2
Joined: Thu Jul 16, 2026 10:31 am

How to get the MSI file in Post-Build event

I use two post-build events to sign the setup. One has "Execute this before EXE packing" checked and is supposed to sign the MSI file. The second event has the option unchecked and signs the EXE.

I can pass [| AI_BUILD_OUTPUT_FILE] in the second event and receive the name of the EXE to sign. However, I have not found a way to determine path and name of the MSI file in my first event. AI_BUILD_OUTPUT_FILE points to the EXE file that at this point doesn't yet exist. The MSI file that I'm interested is in a randomly named tmp folder.

Does anyone has a better idea to find this MSI than scanning the build folder for tmp subfolders with MSIs in them?
Catalin
Posts: 7847
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get the MSI file in Post-Build event

Hello and welcome to our forums,

What you are doing can be achieved much easier via our "Digital Signature" page.

Configure the setup to be signed there and both MSI and the EXE file will be signed with the same certificate, without all the headache.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cwollenhaupt
Posts: 2
Joined: Thu Jul 16, 2026 10:31 am

Re: How to get the MSI file in Post-Build event

Unfortunately I can't use the Digital Signature page anymore, since our signing process is now only available as part of a build pipeline.
Catalin
Posts: 7847
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get the MSI file in Post-Build event

Hello,

Please note that you can use either our PowerShell automation/command line automation to enable signing as part of your build pipeline.

Set digital certificate file and password

IDigitalSignature - PowerShell

Hope this helps!

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

Re: How to get the MSI file in Post-Build event

You are always welcome, Helen!

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

Return to “Building Installers”