From 54ae61884c05cd05bb6e58a1df3b4aace657da87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=20=E6=B0=B4=E9=BE=99?= Date: Thu, 22 Feb 2024 16:10:03 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E5=A4=8D=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E3=80=8C=E6=9B=B4=E6=94=B9=E3=80=8D=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=B9=B1=E7=A0=81=202=E3=80=81=E5=B0=86=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E8=84=9A=E6=9C=AC=E3=80=8C=E5=AE=89=E8=A3=85=E3=80=8D?= =?UTF-8?q?=E3=80=81=E3=80=8C=E5=8D=B8=E8=BD=BD=E3=80=8D=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E5=90=8E=E3=80=8C=E9=87=8D=E5=90=AF=E3=80=8D=E6=94=B9=E6=88=90?= =?UTF-8?q?=E3=80=8C=E6=B3=A8=E9=94=80=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeaselSetup/InstallOptionsDialog.cpp | 2 +- output/install.nsi | 24 ++++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/WeaselSetup/InstallOptionsDialog.cpp b/WeaselSetup/InstallOptionsDialog.cpp index f3750d6f7..768ae5b69 100644 --- a/WeaselSetup/InstallOptionsDialog.cpp +++ b/WeaselSetup/InstallOptionsDialog.cpp @@ -1,4 +1,4 @@ -#include "stdafx.h" +#include "stdafx.h" #include "InstallOptionsDialog.h" #include diff --git a/output/install.nsi b/output/install.nsi index c2ec2f13d..8149b8f76 100644 --- a/output/install.nsi +++ b/output/install.nsi @@ -264,7 +264,17 @@ program_files: ; Prompt reboot StrCmp $0 "Upgrade" 0 +2 - SetRebootFlag true + ; SetRebootFlag true + + ; Prompt logoff + MessageBox MB_YESNO|MB_ICONINFORMATION \ + "安装完毕,注销后生效。$\n$\n「是」立即注销,「否」手动注销。" \ + /SD IDYES IDYES label_yes IDNO label_no + + label_yes: + System::Call "User32::ExitWindowsEx(i 0x0, i 0x0) i .r0" + + label_no: SectionEnd @@ -319,6 +329,16 @@ Section "Uninstall" RMDir /REBOOTOK "$SMPROGRAMS\$(DISPLAYNAME)" ; Prompt reboot - SetRebootFlag true + ; SetRebootFlag true + + ; Prompt logoff + MessageBox MB_YESNO|MB_ICONINFORMATION \ + "安装完毕,注销后生效。$\n$\n「是」立即注销,「否」手动注销。" \ + /SD IDYES IDYES label_yes IDNO label_no + + label_yes: + System::Call "User32::ExitWindowsEx(i 0x0, i 0x0) i .r0" + + label_no: SectionEnd