How to disable close button in the ABORT Message box in nsis? - dialog

I have used nsi script for creating exe file.In the installation steps I have one message box which shows confirmation dialog box if user wants to cancel the installation.
!define MUI_ABORTWARNING "Are you sure want to abort the installation"
It produces following message box:
In this message box contains disable x close button in the above of the messagebox.now i want to remove that [x] close button.
[or]
Is there any other message box is available to do this job?

NSIS uses the normal MessageBox and that only allows you control the buttons. Close means cancel/no/abort and this is normal windows behavior...
To change this you would need to implement a custom dialog and recompile NSIS.

Related

NSIS: How to distinguish between Cancel and Close button

In NSIS, on a custom page, I want to skip the page when the user presses the Cancel button, but I want to exit the installer (with confirmation) when the user presses the window's X button. How do I do that?
Currently, by using Modern UI and custom abort function, I get the same function called regardless of which of the two buttons is pressed.
This is not normal installer behavior and I would not recommend that you try to implement this.
If you still want to try I guess it might be possible with the ButtonEvent plug-in or the WndSubclass plug-in...

how to show EULA during upgrade using installshield

the EULA window is enabled through the Interview panel in Installshield 2011, and it works fine when installing the program first time. However, it won't show in the dialog sequence when we do the upgrade.
I guess it is a default behaviour in Installshield, is it possible to show it all the time? is it wise to do so?
You can Launch Eula window (License Agreement dialog) or custom dialog anytime you want.
When upgrade, launch Eula Dialog from NextButton on SetupResume Dialog, move another conditions to Next Button Eula Dialog, if using License Agreement dialog you must add another conditions "Not Installed" to old Eula Dialog conditions
Next Button Events For License Agreement Dialog will be like this:
Event: NewDialog,
Argument: LicenseAgreement,
Condition: Not Installed
Event: EndDialog,
Argument: Return,
Condition: OutOfNoRbDiskSpace <> 1 AND Installed
Next Button Events For SetupResume Dialog:
Event: NewDialog,
Argument: LicenseAgreement,
Condition: 1
I ran into this problem rather recently with InstallShield 2014, and was having a hard time getting the EULA to pop up on the automagic upgrade path even when adding it to the Next button of the SetupInitialization dialog.
I did find a way to make it happen though:
Go into the Behavior and Logic group, select Custom Actions and Sequences. Expand Sequences > Installation > User Interface.
You can right-click and Insert objects into here. From the Insert Action dialog, select Dialogs in the first dropdown. Then select the EULA-displaying dialog (LicenseAgreement in my case). That will insert it into the UI portion of the Installation Sequence.
From there, you can drag it to where you need it. I dropped it in right after SetupInitialization, but you can also drag it down to just after the PatchWelcome / InstallWelcome / SetupResume / MaintenanceWelcome UI components.
If you do this, you'll want to go to your InstallWelcome dialog (normal installation) and make sure that you skip the EULA there in order to avoid showing it twice. Setting the target to ReadyToInstall (the next step of the LicenseAgreement in my case) allowed me to do that.
That said, doing this means that the EULA will come up every time the installer runs. Ensure that this is what you really want to do.

NSIS auto accept dialog in silent mode

I have an nsis installer with a custom dialog within that has an Accept button but when i run it in silent mode , it does not accept the dialog. How to make it auto clicking accept silently?
If your dialog was a standard MessageBox, simply add the /SD button_id_to_use parameter to the MessageBox instruction to tell NSIS what is the choice to use in silent mode:
MessageBox MB_YESNO "Accept?" /SD IDNO IDNO Skipped
if your dialog is a custom page, the problem is that in silent mode, no pages are involved at all (even hidden), and no page callback are trigerred. You need to check IfSilent and call the logic that is triggered by the Accept button separately from either the .onInit or a section.
IfSilent Accepted
MessageBox MB_YESNO "Accept?" IDNO Skipped
Accepted:
// some code when accepted
Skipped:

How to show details by default with NSIS installer

With NSIS a basic build will have a "Show Details" button which will show the installer script messages. Is there a way to make this the default such that the user does not have to click "Show Details"?
Set ShowInstDetails attribute to show

Cancelling an InnoSetup installer

Situation
During the installation of our product I detect if our programs are still running (from a previous installation) by using CheckForMutexes. If our programs are still running I pop up a message box (by using MsgBox) that tells the user to close the programs. If the user clicks the ok and they haven't closed our programs, the same message box is displayed. I'd like to display a cancel button in the MsgBox that aborts the installation, which would be desired in the case the user doesn't want to close the running programs.
Question
How can I abort an InnoSetup install programmatically?
Thanks in advance
Take a look at InitializeSetup and Abort in the Inno Setup help. The Abort function will allow the setup to exit.
Call the WizardForm.Close() method.
It will prompt the user if she really wants to cancel the installation.
procedure ExitSetup;
begin
WizardForm.Close;
end;

Resources