The following VBScript sample hides the Cancel button and installs Example.msi. Dim Installer As Object Set Installer = CreateObject('WindowsInstaller.Installer') Installer.UILevel = msiUILevelBasic + msiUILevelHideCancel Installer.InstallProduct 'example.msi' Hiding the Cancel Button for Parts of an Installation Using a Custom Action. Jan 18, 2012 Along the same lines as removing items from the Windows component store to save space, we have recently seen a couple of questions come in about the WindowsInstaller directory. This is a hidden system directory; it is used by the Windows Installer service to cache installer data files for various applications. Over time, this directory. May 07, 2005 Windows Installer is trying to install something (the event log doesn't say what). As a result, I can not install certain items. What I am looking for is a way to tell the Windows Installer to abort/cancel the operation it is trying to perform. If someone can tell me how to abort/cancel the Windows Installer I would appreciate it.
You can hide the Cancel button that is used to cancel an installation by using a command-line option, the Windows Installer API, or a custom action. The Cancel button can be hidden for part or all of the installation depending on which method you use.
Hiding the Cancel Button from the Command Line
The Cancel button can be hidden during installation by using the (!) command-line option. This can only be done for a basic user interface level installation (/qb). The Cancel button is hidden for the entire installation. For more information, see Command-Line Options and User Interface Levels. The following command line hides the Cancel button and installs Example.msi.
How To Cancel Windows Installer Mac
msiexec /I example.msi /qb!
Hiding the Cancel Button from an Application or Script
You can write an application or script to hide the Cancel button. This can only be done for a basic UI level installation so that the Cancel button is hidden for the entire installation.
To hide the Cancel button from an application, set INSTALLUILEVEL_HIDECANCEL when calling MsiSetInternalUI. The following example hides the Cancel button and installs Example.msi.
To hide the Cancel button from script, add msiUILevelHideCancel to the UILevel property of the Installer Object. The following VBScript sample hides the Cancel button and installs Example.msi.
Hiding the Cancel Button for Parts of an Installation Using a Custom Action
Your installation can hide and unhide the Cancel button during parts of an installation by sending an INSTALLMESSAGE_COMMONDATA message using a DLL custom action or scripts. For more information, see Dynamic-Link Libraries, Scripts, Custom Actions, and Sending Messages to Windows Installer Using MsiProcessMessage.
A call to a custom action must provide a record. Field 1 of this record must contain the value 2 (two) to specify the Cancel button. Field 2 must contain either the value 0 or 1. A value of 0 in Field 2 hides the button and a value of 1 in Field 2 unhides the button. Note that allocating a record of size 2 with MsiCreateRecord provides fields 0, 1, and 2.
The following sample DLL custom action hides the Cancel button.
The following VBScript Custom Action hides the Cancel button.