nsis update closes nsis menu
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2206 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
057acd2adb
commit
c0d795a736
1 changed files with 28 additions and 8 deletions
|
@ -114,6 +114,10 @@ Function .onInit
|
||||||
|
|
||||||
temp:
|
temp:
|
||||||
|
|
||||||
|
# Close the NSIS Menu (files in use cannot be updated)
|
||||||
|
|
||||||
|
Call CloseMenu
|
||||||
|
|
||||||
# Remove temporary file on next reboot
|
# Remove temporary file on next reboot
|
||||||
|
|
||||||
Delete /REBOOTOK "$TEMP\NSISUpdate.bin"
|
Delete /REBOOTOK "$TEMP\NSISUpdate.bin"
|
||||||
|
@ -265,17 +269,19 @@ Function GetParameters
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
#####################################################################
|
Function CloseMenu
|
||||||
# Update (Installer Section)
|
|
||||||
|
|
||||||
Section ""
|
Push $R0
|
||||||
|
|
||||||
FindWindow ${TEMP3} "#32770" "" $HWNDPARENT
|
FindWindow $R0 "NSIS Menu"
|
||||||
GetDlgItem ${TEMP3} ${TEMP3} 1111
|
IntCmp $R0 0 +2
|
||||||
|
SendMessage $R0 ${WM_CLOSE} 0 0
|
||||||
|
|
||||||
SetDetailsPrint none
|
Pop $R0
|
||||||
|
|
||||||
# Connect to the internet
|
FunctionEnd
|
||||||
|
|
||||||
|
Function ConnectInternet
|
||||||
|
|
||||||
ClearErrors
|
ClearErrors
|
||||||
Dialer::AttemptConnect
|
Dialer::AttemptConnect
|
||||||
|
@ -293,6 +299,20 @@ Section ""
|
||||||
|
|
||||||
connected:
|
connected:
|
||||||
|
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# Update (Installer Section)
|
||||||
|
|
||||||
|
Section ""
|
||||||
|
|
||||||
|
FindWindow ${TEMP3} "#32770" "" $HWNDPARENT
|
||||||
|
GetDlgItem ${TEMP3} ${TEMP3} 1111
|
||||||
|
|
||||||
|
SetDetailsPrint none
|
||||||
|
|
||||||
|
Call ConnectInternet
|
||||||
|
|
||||||
!insertmacro MUI_INSTALLOPTIONS_READ ${TEMP1} "io.ini" "Field 2" "State"
|
!insertmacro MUI_INSTALLOPTIONS_READ ${TEMP1} "io.ini" "Field 2" "State"
|
||||||
StrCmp ${TEMP1} "1" "" CVS
|
StrCmp ${TEMP1} "1" "" CVS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue