Tatyana Mykhnevych
Posts: 40
Joined: Thu Feb 13, 2020 4:47 pm

Avoid cancelation of the app installing

Hello,

My Advanced Installer version is 18.6.
I use basic user interface application installation for installaing updates.
I need to avoid cancelation of the app installing. But during installation Windows Installer popup is shown with progress bar and cancel button. I need to remove this cancel button or do not show this popup at all. Is there any way to do this?

Image

Looking forward to hearing from you.

Best regards,
Tanya
Attachments
Untitled.png
Untitled.png (10.38 KiB) Viewed 30140 times
Liviu
Posts: 1395
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Avoid cancelation of the app installing

Hello Tanya,

Please note that the dialogs shown during a basic UI installation are displayed automatically by Windows Installer and cannot be modified.

You can try using the dialog editor to modify the "Visible" flag for all "Cancel" buttons. This can be done only in an Enterprise project and it will work only for full UI.

But if you want to install updates without user interaction, you can follow the steps described in the How to handle updates without elevation tutorial.

Please note that in order for the Updater to automatically check for updates you need to use the "Automatic: using a Windows scheduled task" option from the "Updater" page of your project.

Hope this helps!

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sasha
Posts: 88
Joined: Fri Oct 20, 2023 8:37 pm

Re: Avoid cancelation of the app installing

This custom action (execute inline script) will disable the 'Cancel' button in all forms of UI

Dim Record
Set Record = Installer.CreateRecord(2)

Record.IntegerData(1) = 2
Record.IntegerData(2) = 0

Session.Message &H0B000000, Record
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Avoid cancelation of the app installing

Hello,

Thank you for your followup on this and for sharing the solution with us!

I am sure this will be of help for further users facing a similar scenario.

The only note I want to add here is the fact that VBScript will be deprecated soon.

VBScript Deprecation impact and solution on installer packages

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sasha
Posts: 88
Joined: Fri Oct 20, 2023 8:37 pm

Re: Avoid cancelation of the app installing

Indeed, VBS will die off soon :)

I think that a C# custom action could be used instead in such case.

One caveat to this method: the final 'Exit' dialog will have the `Cancel` button enabled.
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Avoid cancelation of the app installing

Hello,

Indeed, we could use a C# custom action instead. :)

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
StefanKr
Posts: 1
Joined: Thu Mar 20, 2025 11:31 am
Contact: Website

Re: Avoid cancelation of the app installing

Depending on how you launch your installer msiexec /qb! (instead of /qb without the !) will hide the Cancel button.
Catalin
Posts: 7794
Joined: Wed Jun 13, 2018 7:49 am

Re: Avoid cancelation of the app installing

Hello Stefan,

Thank you for your contribution to our forums.

I'm sure this will come in handy for further users facing a similar scenario.

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

Return to “Building Installers”