Hi,
During the actual installation process the "Cancel" button cannot be disabled. However, you can
hide it by using a 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
This VBScript code can be added as an Attached custom action right before your .NET custom action. Note that you need to set the "Function Name" field in the
Custom Action Properties page to
HideCancelButton.
If you want to show the "Cancel" button after the .NET custom action is executed you can use another VBScript custom action:
Code: Select all
Function ShowCancelButton()
Dim Record
Const msiMessageTypeCommonData = &H0B000000
Set Record = Installer.CreateRecord(2)
Record.IntegerData(1) = 2
Record.IntegerData(2) = 1
Session.Message msiMessageTypeCommonData, Record
' return success
HideCancelButton = 1
Exit Function
End Function
This code can be added as an Attached custom action right after your .NET custom action.
Regards,
Cosmin
FOLLOW US