/build/static/layout/Breadcrumb_cap_w.png

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.UILevel=35
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"

 

References:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa368791%28v=vs.85%29.aspx


Comments

  • msiexec /i MyInstaller.msi /qb! - jagadeish 12 years ago
  • when using /qb itself give the basic mode installation . whats the purpose of going into /qb! - saranyadurairasu 12 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 12 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 12 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.
    Thx
    Stephan - mac-duff 12 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
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