Disabling Cancel Button during installation of MSI package

To disable the ‘Cancel’ button during installation, use the following methods:

  1. Use /qb! While installing the package in basic user interface level.

For example: msiexec /I <Path to MSI Package> /qb!

    2. In the Attribute column of Control table, set the value as 1 for the ‘Cancel’ button for all the dialogs.



 3. If you want to hide the Cancel button during installation as well as uninstallation (even through ARP) then use the following vbscript as CA in the package


Const msiMessageTypeCommonData = &H0B000000

Dim Record : Set Record = Installer.CreateRecord(2)

Record.IntegerData(1) = 2

Record.IntegerData(2) = 0

Call Session.Message(msiMessageTypeCommonData, Record)

HideCancelButton = 1



If you are doing a basic user interface level installation (using qb), you don’t need to  put ‘!’ in front of qb in the command line.

You have to sequence this CA in immediate mode at the beginning of execute sequence and after installfinalize if there are any CA scheduled after that.


4. Also you can set UILevel property to 35 in a vbscript and then install the package

Set installer = CreateObject("WindowsInstaller.Installer")
Installer.InstallProduct "abc.msi"


For uninstallion, use the following vbscript

Set installer = CreateObject("WindowsInstaller.Installer")
Installer.UILevel=msiUILevelBasic + msiUILevelHideCancel
Installer.InstallProduct "abc.msi", "REMOVE=ALL"





  • msiexec /i MyInstaller.msi /qb! - jagadeish 10 years ago
  • when using /qb itself give the basic mode installation . whats the purpose of going into /qb! - saranyadurairasu 10 years ago
    • Of course /qb will give the basic mode installation. but when you use /qb, you can see a "Cancel" button on your right bottom of the basic UI. The reason for going into /qb! is, it will not show you the "Cancel" button.. - jagadeish 10 years ago
  • @jagadeish: already mentioned about /qb! in point 1, others are different methods of disabling cancel button to be used in different scenarios - SilentKiller 10 years ago
  • Hi there,
    can please someone help me where I have to put the Custom Acition Exactly? I Created a a VBS Script with the MSI number 6 and placed it as first exec sequence but nothign happens. I also should mention that the package is a with Orca created one and has no GUI at all.
    Stephan - mac-duff 9 years ago
This post is locked
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ