To disable the ‘Cancel’ button during installation, use the following methods:
- 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
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