(5.2.2) Can not Disable Cancel button in uninstall dialog - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rosen.nedialkov
Posts: 19
Joined: Wed Feb 07, 2007 11:43 am
Contact: ICQ

(5.2.2) Can not Disable Cancel button in uninstall dialog

Hello, I have the following problem. I can not disable the cancel button while uninstalling my product. I badly need this because I use many custom actions in dlls while installing/uninstalling. I had disabled the Cancel button while installing but cannot find a way to do it while uninstalling.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

Disabling the Cancel button is not possible during an uninstall, but you can hide it, using a VBScript or C++ DLL Custom Action. For example, you can add the following VBScript CA under "InstallExecuteSequence -> Begin" (or before your first Custom Action):

Code: Select all

Function HideCancelButton()
  Dim Record
  Const msiMessageTypeCommonData = &H0B000000
  Set Record = Installer.CreateRecord(2)
  Record.IntegerData(1) = 2
  Record.IntegerData(2) = 0
  Session.Message msiMessageTypeCommonData, Record
 
  ' return success
  HideCancelButton = 1
  Exit Function
End Function
For more details, see:
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”