Archive: SystemMenu and icons issue


SystemMenu and icons issue
Hi,
I recently started trying NSIS for the "ProntoProEdit NG" product being deployed by my company. I am very much impressed with it.

I have however noticed two small issues, which i would like to fix. I am using Modern UI/InstallOptions for the setup being developed.

The first issue is regarding the

"Are you sure you want to quit ProntoProEdit NG Setup?"

message which shows up on clicking the close button on the titlebar displayed on the finish page. I have noticed that this does not occur in the installers of several other software products using NSIS.

How can I solve this?

The second issue is regarding the display of icons on custom pages. I have two custom pages which have icons refering to icons in a Resource folder. This resource folder is under the same folder where the setup is built. These icons are displayed when I run the setup from this location. But the same do not display when the setup is run from a different location. I believe i am incorrectly packing the icons in the installer. Kindly assist.

Regards
Anup


1. remove the line !define MUI_ABORTWARNING from your script

2. try writing the location of the icons to the ini of your io-page on runtime

i.e. !insertmacro MUI_INSTALLOPTIONS_WRITE "io.ini" "Field 1" "State" "$EXEDIR\MyIcon.ico"


Hi,
Thanks for the prompt reply. These are my queries further to the problem mentioned earlier.

1. The line !define MUI_ABORTWARNING seems to remove the warning from all pages. However, I am interested in removing it in the finish page only.

2. I am interested in packing the icon into the Setup and then use it at run time.
Do i have to extract the icon files to a folder?
I am also curious to know which folder I must mention for InstallOption to pick these files from.


Regards
Anup


if you want to use the icon of your installer, use the following code

!include "FileFunc.nsh"
!insertmacro GetExeName
...
${GetExeName} $R0
!insertmacro MUI_INSTALLOPTIONS_WRITE "io.ini" "Field 1" "State" "$R0,0"

if you want to use any other icon you have to include it with the File/ReserveFile command and extract it to a folder of your choice.

How can you have an abort warning on the finish page. Surely the Cancel button is disabled (it always is here?)

-Stu


Thanks a lot for that help Yathosho.
I was able to solve the Icon related issue.

In reply to Stu, the cancel button used to appear on the finish page too. I had to hide it using the following code in the PreFinish function of the finish page.

GetDlgItem $1 $HWNDPARENT 2
ShowWindow $1 ${SW_HIDE}

Is there a way to hide disable the 'X' button on the titlebar? or remove all the system buttons from it?

Regards
Anup