I'm sorry to be bothering you again, it seems like I refuse to learn from the NSIS Wiki 😳
1)
I am using a custom page at the end of the installer, including a checkbox.
At the moment, the user can click "Finish" even if the checkbox is not checked and that's what I want to prevent.
How can I do that?
; handle variables
Var hCtl_hinweis
Var hCtl_hinweis_Label1
Var hCtl_hinweis_Label3
Var hCtl_hinweis_CheckBox
Var hCtl_hinweis_Label4
Var hCtl_hinweis_Font1
Var hCtl_hinweis_Font2
; dialog create function
Function fnc_hinweis_Create
; custom font definitions
CreateFont $hCtl_hinweis_Font1 "Microsoft Sans Serif" "9" "400"
CreateFont $hCtl_hinweis_Font2 "Microsoft Sans Serif" "9" "700"
; === hinweis (type: Dialog) ===
nsDialogs::Create 1018
Pop $hCtl_hinweis
${If} $hCtl_hinweis == error
Abort
${EndIf}
!insertmacro MUI_HEADER_TEXT "Hinweis" "Bitte beachten Sie - WICHTIG!"
; === Label1 (type: Label) ===
${NSD_CreateLabel} 8u 10u 280u 68u "Direkt nach diesem Installationschritt MÜSSEN Sie eine Installation auf jedem PC vornehmen, von dem aus ascara-Applikationen aufgerufen werden.$\r$\nFühren Sie dazu das Programm im Verzeichnis ..\ascara\Support\Utilities aus.$\r$\nSofern Sie einen TerminalServer verwenden, müssen die Komponenten auch dort installiert werden!"
Pop $hCtl_hinweis_Label1
SendMessage $hCtl_hinweis_Label1 ${WM_SETFONT} $hCtl_hinweis_Font1 0
; === Label3 (type: Label) ===
${NSD_CreateLabel} 8u 80u 220u 30u "Die Installation dauert nur wenige Augenblicke.$\r$\nBei der Installation handelt es sich um Klassenbibliotheken, Laufzeitumgebungen und das Microsoft .NET Framework."
Pop $hCtl_hinweis_Label3
SendMessage $hCtl_hinweis_Label3 ${WM_SETFONT} $hCtl_hinweis_Font1 0
; === CheckBox (type: Checkbox) ===
${NSD_CreateCheckbox} 8u 115u 111u 14u "Gelesen und akzeptiert"
Pop $hCtl_hinweis_CheckBox
GetFunctionAddress $0 OnCheckbox
nsDialogs::OnClick $hCtl_hinweis_CheckBox $0
; === Label4 (type: Label) ===
${NSD_CreateLabel} 128u 37u 90u 10u "ascComponents.exe"
Pop $hCtl_hinweis_Label4
SendMessage $hCtl_hinweis_Label4 ${WM_SETFONT} $hCtl_hinweis_Font2 0
FunctionEnd
; dialog show function
Function fnc_hinweis_Show
Call fnc_hinweis_Create
nsDialogs::Show $hCtl_hinweis
FunctionEnd
;Checkbox wird geändert
Function OnCheckbox
Pop $0
${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6
DetailPrint "$0/$1/$2 $4:$5:$6 Checkbox 'Gelesen und akzeptiert' bestätigt"
FunctionEnd Tell me if you don't need that code so I can remove it to keep the post as short as possible!2)
I'm writing into the Registry, after that I open up our update.exe file which updates the database of our software if you want to. After writing into Registry, the program skips its actions after pressing the "Yes" or "No" button. If I run the installation a second time it works fine.
So I'm guessing it's the registry which gets updated AFTER the installation is finished.
My question (finally):
Is there any way to refresh the registry while the installation is running?
Thank you very much for your help! 🙂