cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yaniv_av
Level 4

Disable the cancel option via the "X" button in the titlebar, during installation

Hi,

I'm using basic MSI project.
I want to prevent any option to cancel the installation in the "Setup Progress" dialog.
I can hide the "cancel" button, but the user can still press the "X" button in the dialog's titlebar.
Is it possible to hide/disable this "X" in the titlebar?
If not, is there any way to override the default behavior and not to cancel the installation? (via some custom action for example)

Thanks!
Labels (1)
0 Kudos
(1) Reply
yaniv_av
Level 4

Ok.
This can be done by the folloing custom action code:
	HWND hwndSetupDialog = GetForegroundWindow();    
HMENU hwndMenu = GetSystemMenu(hwndSetupDialog, FALSE);
RemoveMenu(hwndMenu, SC_CLOSE, MF_DISABLED | MF_BYCOMMAND);
DrawMenuBar(hwndSetupDialog);
0 Kudos