# HG changeset patch # User Mark Doliner # Date 1093705882 0 # Node ID b0f2c9c0d23bcae32e53ba4a88b3197c6ed56757 # Parent 7bb46db14be0eea12ec120849e0cf2e65dda116d [gaim-migrate @ 10794] Save the "run on startup?" Windows pref upon Gaim upgrades committer: Tailor Script diff -r 7bb46db14be0 -r b0f2c9c0d23b gaim-installer.nsi --- a/gaim-installer.nsi Sat Aug 28 14:29:25 2004 +0000 +++ b/gaim-installer.nsi Sat Aug 28 15:11:22 2004 +0000 @@ -11,6 +11,7 @@ Var GTK_THEME_SEL Var LANG_IS_SET Var ISSILENT +Var STARTUP_RUN_KEY ;-------------------------------- ;Configuration @@ -200,6 +201,18 @@ Call CheckUserInstallRights Pop $R0 + ;If gaim is currently set to run on startup, + ; save the section of the Registry where the setting is before uninstalling, + ; so we can put it back after installing the new version + ClearErrors + ReadRegStr $STARTUP_RUN_KEY HKCU "${GAIM_STARTUP_RUN_KEY}" "Gaim" + IfErrors +3 + StrCpy $STARTUP_RUN_KEY "HKCU" + Goto +4 + ReadRegStr $STARTUP_RUN_KEY HKLM "${GAIM_STARTUP_RUN_KEY}" "Gaim" + IfErrors +2 + StrCpy $STARTUP_RUN_KEY "HKLM" + StrCmp $R0 "HKLM" gaim_hklm StrCmp $R0 "HKCU" gaim_hkcu done @@ -446,6 +459,12 @@ WriteUninstaller "$INSTDIR\${GAIM_UNINST_EXE}" SetOverwrite off + ; If we previously had gaim setup to run on startup, make it do so again + StrCmp $STARTUP_RUN_KEY "HKCU" +1 +2 + WriteRegStr HKCU "${GAIM_STARTUP_RUN_KEY}" "Gaim" "$INSTDIR\gaim.exe" + StrCmp $STARTUP_RUN_KEY "HKLM" +1 +2 + WriteRegStr HKLM "${GAIM_STARTUP_RUN_KEY}" "Gaim" "$INSTDIR\gaim.exe" + done: SectionEnd ; end of default Gaim section