Hi Monty (and Kim and whoever else is interested :)),

You should probably localize the load theme
descriptions as well.

BTW, I've made some changes to the search.nsi
installer to detect which theme is currently active
and copy the appropriate theme_*.css file to
theme.css.  I've attached the search.nsi file here as
search.nsi.txt so be sure to rename it and you'll have
to build the installer with nsis.

Would you be willing to be a guinea pig and try it? 
I've not got XP available to me until late tonight to
test it myself.

Brent

--- Monty Scroggins <[EMAIL PROTECTED]> wrote:

> (this copy actually includes the attachment!) :-)
> 
> 
> Hi Kim,
> 
> Attached is the configure.xml(.txt) with the
> localization changes made
> to it.  It seems to work fine..
> 
> I put the variables in the file, and referenced them
> in the menu defs..
> Is there another change that needs to be made
> elsewhere?  I dont know
> how the translation is done.
> 
> Monty
> 
> 
> Kim Gr�sman wrote:
> 
> > Hi Monty,
> >
> > Just one thing: Make sure you use a localizable
> constant for the menu 
> > options - that's what the weird arrays are for.
> With that in place, 
> > people can translate the menu from strings.js.
> >
> > Thanks,
> > Kim
> >
> 
> > <search function="configureDQSD">
>   <name>Configure DQSD</name>
>   <description>
>     Configure DQSD<br/>
>   </description>
>   <link></link>
>   <category nomenu="true">Configure</category>
>   <contributor>Brent Beardsley</contributor>
> 
>   <script><![CDATA[
>     var CONFIGURE_LOCAL_ALIASES_NAME = 
>     {
>       en: "Local Aliases..."
>     };
> 
>     var CONFIGURE_LOCAL_ALIASES_DESCRIPTION = 
>     {
>       en: "Edit local aliases"
>     };
>     
>     var CONFIGURE_LOCAL_PREFERENCES_NAME = 
>     {
>       en: "Local Preferences..."
>     };
> 
>     var CONFIGURE_LOCAL_PREFERENCES_DESCRIPTION = 
>     {
>       en: "Edit local preferences"
>     }
> 
>     var CONFIGURE_LOCAL_STYLESHEET_NAME = 
>       {
>         en: "Local Stylesheet..."
>       }
> 
>       var CONFIGURE_LOCAL_STYLESHEET_DESCRIPTION = 
>       {
>         en: "Edit local stylesheet"
>       }
> 
>     var CONFIGURE_SYSTEM_ALIASES_NAME = 
>     {
>       en: "System Aliases..."
>     };
> 
>     var CONFIGURE_SYSTEM_ALIASES_DESCRIPTION = 
>     {
>       en: "Edit system aliases"
>     };
>     
>     var CONFIGURE_SYSTEM_PREFERENCES_NAME = 
>     {
>       en: "System Preferences..."
>     };
> 
>     var CONFIGURE_SYSTEM_PREFERENCES_DESCRIPTION = 
>     {
>       en: "Edit system preferences"
>     }
> 
>     var CONFIGURE_RELOAD_DQSD_NAME = 
>     {
>       en: "Reload..."
>     };
> 
>     var CONFIGURE_RELOAD_DQSD_DESCRIPTION =
>     {
>       en: "Reload Quick Search Deskbar"
>     };
> 
>     var CONFIGURE_RELOAD_DQSD_PROMPT =
>     {
>       en: "Are you sure you want to reload the Quick
> Search Deskbar?"
>     };
> 
>     var CONFIGURE_INSTALLED_ADDONS_NAME = 
>     {
>       en: "Installed Addons"
>     };
>     
>     var CONFIGURE_COLOR_SCHEME_DESCRIPTION = 
>     {
>       en: "Load Color Scheme"
>     };
> 
>     var BLUE_COLOR_SCHEME_DESCRIPTION = 
>     {
>       en: "Blue"
>     };
>     
>     var OLIVE_COLOR_SCHEME_DESCRIPTION = 
>     {
>       en: "Olive"
>     };
>     
>     var SILVER_COLOR_SCHEME_DESCRIPTION = 
>     {
>       en: "Silver"
>     };
>     
>     var NONE_COLOR_SCHEME_DESCRIPTION = 
>     {
>       en: "None"
>     };
> 
> 
>       function editSearchFile(strFilename)
>       {
>               return editConfigFile(strFilename);
>       }
> 
>     function editCSSFile(strFilename)
>       {
>               var myEditor = (typeof cssEditorExe !=
> "undefined") ? cssEditorExe : "notepad";
>               var install_dir = ".";
>               if (ensureLauncher())
>               {
>                       install_dir = DQSDLauncher.InstallationDirectory;
>               }
>               var cmd = "\""+myEditor+"\"
> \""+install_dir+"\\"+strFilename + "\"";
>               openDocument(cmd);
>               return "";
>       }
> 
>       function editConfigFile(strFilename)
>       {
>               var myEditor = (typeof configureEditorExe !=
> "undefined") ? configureEditorExe : "notepad";
>               var install_dir = ".";
>               if (ensureLauncher())
>               {
>                       install_dir = DQSDLauncher.InstallationDirectory;
>               }
>               var cmd = "\""+myEditor+"\"
> \""+install_dir+"\\"+strFilename + "\"";
>               openDocument(cmd);
>               return "";
>       }
> 
>         function buildConfigureMenu(mb, hmenu)
>       {
>               mb.AppendMenuItem(
> local(CONFIGURE_LOCAL_ALIASES_NAME),
> "editConfigFile(\"localaliases.txt\")",
> local(CONFIGURE_LOCAL_ALIASES_DESCRIPTION), hmenu);
>               mb.AppendMenuItem(
> local(CONFIGURE_LOCAL_PREFERENCES_NAME),
> "editConfigFile(\"localprefs.js\")",
> local(CONFIGURE_LOCAL_PREFERENCES_DESCRIPTION),
> hmenu);
>               mb.AppendMenuItem(
> local(CONFIGURE_LOCAL_STYLESHEET_NAME),
> "editCSSFile(\"localsearch.css\")",
> local(CONFIGURE_LOCAL_STYLESHEET_DESCRIPTION),
> hmenu);
>          
>          var confthememenu = mb.AppendSubMenu(
> local(CONFIGURE_COLOR_SCHEME_DESCRIPTION), hmenu);
>          mb.AppendMenuItem(
> local(BLUE_COLOR_SCHEME_DESCRIPTION),
> "loadcssfile(\"localsearch_blue.css\")", "Load the
> blue color scheme", confthememenu);
>               mb.AppendMenuItem(
> local(OLIVE_COLOR_SCHEME_DESCRIPTION),
> "loadcssfile(\"localsearch_olive.css\")", "Load the
> olive color scheme", confthememenu);
>               mb.AppendMenuItem(
> local(SILVER_COLOR_SCHEME_DESCRIPTION),
> "loadcssfile(\"localsearch_silver.css\")", "Load the
> silver color scheme", confthememenu);
>       mb.AppendMenuItem(
> local(NONE_COLOR_SCHEME_DESCRIPTION),
> "loadcssfile(\"none\")", "Remove the current color
> scheme", confthememenu);
>               
>               mb.AppendSeparator(hmenu);
>               mb.AppendMenuItem(
> local(CONFIGURE_SYSTEM_ALIASES_NAME),
> "editConfigFile(\"aliases.txt\")",
> local(CONFIGURE_SYSTEM_ALIASES_DESCRIPTION), hmenu);
>               mb.AppendMenuItem(
> local(CONFIGURE_SYSTEM_PREFERENCES_NAME),
> "editConfigFile(\"preferences.js\")",
> local(CONFIGURE_SYSTEM_PREFERENCES_DESCRIPTION),
> hmenu);       
>               mb.AppendSeparator(hmenu);
>               mb.AppendMenuItem(
> local(CONFIGURE_RELOAD_DQSD_NAME), "if
> (confirm('"+local(CONFIGURE_RELOAD_DQSD_PROMPT)+"'))
> reload();",
> local(CONFIGURE_RELOAD_DQSD_DESCRIPTION), hmenu);
> 
>               ensureLauncher();
>               var addonFolders =
>
getFolders(DQSDLauncher.InstallationDirectory+"\\addons\\");
>               var installedAddons = null;
>               if (addonFolders != "") {
>                       installedAddons = addonFolders.split('\n');
> 
=== message truncated ===


                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 
; search.nsi
;
; Installs Dave's Quick Search Deskbar
;

; The name of the installer
Name "Dave's Quick Search Deskbar"

; What is the minimum required version of IE?
!Define IE_MAJOR_REQUIRED  5
!Define IE_MINOR_REQUIRED  5
!Define HOW_TO_TURN_ON_TOOLBAR "Right-click in your taskbar and select$\n$\n    
Toolbar > Add Quick Search...$\n$\nto add the Quick Search Deskbar to your 
taskbar."
!Define TITLE_AND_COPYRIGHT "Dave's Quick Search Deskbar$\nCopyright � 
2002-2004 David Bau$\nDistributed under the terms of the$\nGNU General Public 
License, Version 2"
!Define DQSD_CLSID "{226b64e8-dc75-4eea-a6c8-abcb4d1d37ff}"
!Define DQSD_TITLE "Dave's Quick Search Deskbar"

; Silent install
;DirShow hide
CRCCheck on
SetDatablockOptimize on
Icon search.ico
SilentInstall silent
;ShowInstDetails show

; The file to write
OutFile "..\dqsd.exe"

;--------------------------------
; GetWindowsXPTheme
; returns "" for windows classic
; returns "blue" for xp blue
; returns "silver" for xp silver
; returns "olive" for xp olive
Function GetWindowsXPTheme
  Push $0
  Push $1

  ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\ThemeManager" 
"ThemeActive"
  StrCmp $1 "1" 0 noXPTheme

  ;has XP Theme
  ReadRegStr $1 HKLM "Software\Microsoft\Windows\CurrentVersion\ThemeManager" 
"ColorName"
  ; blue check
  StrCmp $1 "NormalColor" 0 +3
  StrCpy $0 "blue"
  goto doneXPTheme
  ; olive check
  StrCmp $1 "HomeStead" 0 +3
  StrCpy $0 "olive"
  goto doneXPTheme
  ; silver check
  StrCmp $1 "Metallic" 0 +3
  StrCpy $0 "silver"
  Goto doneXPTheme
  ; unknown
  StrCpy $0 ""
  goto doneXPTheme

  noXPTheme:
    ; no theme active
    StrCpy $0 ""
    Goto doneXPTheme

  doneXPTheme:
    Pop $1
    Exch $0
FunctionEnd

; The default installation directory
InstallDir "$PROGRAMFILES\Quick Search Deskbar"

; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKCR "CLSID\${DQSD_CLSID}" "InstallDir"

; The text to prompt the user to enter a directory
DirText "Choose a directory to install in to:"

; The stuff to install
Section "Quick Search Deskbar (required)"
  ; Set output path to the installation directory.
  SetOutPath $INSTDIR

  ; Confirm that the user really does want to install  
  MessageBox MB_YESNO|MB_ICONINFORMATION|MB_DEFBUTTON2 "This will install 
${DQSD_TITLE}.  Would you like to continue?" IDYES userconfirmedinstall
  Abort
  userconfirmedinstall:

  ; Verify that they've got the correct version of IE installed.
  GetDLLVersion "shdocvw.dll" $1 $4
  IntOp $2 $1 & 0xffff0000
  IntOp $2 $2 / 0x00010000
  IntOp $3 $1 & 0x0000ffff
  IntOp $5 $4 & 0xffff0000
  IntOp $5 $5 / 0x00010000
  IntOp $6 $4 & 0x0000ffff
  DetailPrint 'IE Version: $2.$3.$5.$6: OK'
  IntCmp ${IE_MAJOR_REQUIRED} $2 ieMajorVersionOK ieVersionOK ieVersionNotOK
  ieMajorVersionOK:
  IntCmp ${IE_MINOR_REQUIRED} $3 ieVersionOK ieVersionOK ieVersionNotOK

  ieVersionNotOK:
    MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "This version of 
${DQSD_TITLE} requires IE version ${IE_MAJOR_REQUIRED}.${IE_MINOR_REQUIRED} or 
higher.  You are currently running version $2.$3.$\n$\nWould you like to 
continue with the installation anyway?" IDYES ieVersionOK
    Abort
    
  ieVersionOK:

  ; Old versions to delete
  UnRegDLL $INSTDIR\dqsdt253.dll
  Delete /REBOOTOK $INSTDIR\dqsdt253.dll
  UnRegDLL $INSTDIR\dqsdt254.dll
  Delete /REBOOTOK $INSTDIR\dqsdt254.dll
  UnRegDLL $INSTDIR\dqsdt255.dll
  Delete /REBOOTOK $INSTDIR\dqsdt255.dll
  UnRegDLL $INSTDIR\dqsdt257.dll
  Delete /REBOOTOK $INSTDIR\dqsdt257.dll
  UnRegDLL $INSTDIR\dqsdt258.dll
  Delete /REBOOTOK $INSTDIR\dqsdt258.dll

  ; install new DLL
  SetOverwrite try
  ClearErrors
  File "..\DQSDTools.dll"
  IfErrors seeifsame register

  ; If was unable to upgrade, see if files are the same anyway
  seeifsame:
  ClearErrors
  GetDLLVersionLocal "..\DQSDTools.dll" $1 $2
  GetDLLVersion $INSTDIR\DQSDTools.dll $3 $4
  IfErrors isdifferent
  IntCmpU $1 $3 test1 isdifferent isdifferent
  test1:
  IntCmpU $2 $4 test2 isdifferent isdifferent
  test2:
  ClearErrors
  GetFileTimeLocal "..\DQSDTools.dll" $1 $2
  GetFileTime $INSTDIR\DQSDTools.dll $3 $4
  IfErrors isdifferent
  IntCmpU $1 $3 test3 isdifferent isdifferent
  test3:
  IntCmpU $2 $4 register isdifferent isdifferent

  SetOverwrite on

  ; If different, install as another name and rename to correct file on reboot
  isdifferent:
  File /oname=DQSDTools.dll.ins "..\DQSDTools.dll"
  Rename /REBOOTOK "$INSTDIR\DQSDTools.dll.ins" "$INSTDIR\DQSDTools.dll"

  ; We can register the dll and continue
  register:
  RegDLL $INSTDIR\DQSDTools.dll

  ; Determine if this is an upgrade
  StrCpy $8 "The Deskbar has been upgraded.  $\nIf the search bar is already 
present $\non your taskbar, right-click on $\nthe handle to the left of the 
search bar $\nand select 'Refresh' to reload it.  $\nIf the search bar is not 
present, $\n${HOW_TO_TURN_ON_TOOLBAR}$\n$\n${TITLE_AND_COPYRIGHT}"
  IfFileExists "$INSTDIR\search.htm" upgradebar
  StrCpy $8 "The Deskbar has been 
installed.$\n$\n${HOW_TO_TURN_ON_TOOLBAR}$\n$\n${TITLE_AND_COPYRIGHT}"

  upgradebar:
  WriteUninstaller "$INSTDIR\uninstall.exe"

  ; Put files there
  File "..\ChangeLog.txt"
  File "..\aliases.txt"
  File "..\calculate.js"
  File "..\calendar.js"
  File "..\categoryExpander.htc"
  File "..\clock.js"
  File "..\defer_tools.js"
  File "..\dqsd.png"  
  File "..\helpbox.js"
  File "..\helpmenu.js"
  File "..\history.js"
  File "..\holidays.*.xml"
  File "..\loader.js"
  File "..\maximized.htm"
  File "..\preferences.js"
  File "..\readme.txt"
  File "..\savesearchsettings.js"
  File "..\search.css"
  File "..\search.htm"
  File "..\strings.js"
  File "..\tools.js"
  File "..\translate.js"
  File "..\version.js"
  File "..\version.xml"
  File "..\versiondialog.htm"
  File "..\xptoolbar2_default.bmp"
  File "..\xptoolbar1_default.bmp"
  File "..\xptoolbar1_silver.bmp"
  File "..\xptoolbar2_silver.bmp"
  File "..\xptoolbar1_olive.bmp"
  File "..\xptoolbar2_olive.bmp"
  File "..\xptoolbar1_blue.bmp"
  File "..\xptoolbar2_blue.bmp"
  File "..\theme_default.css"
  File "..\theme_silver.css"
  File "..\theme_olive.css"
  File "..\theme_blue.css"
  
  SetOutPath "$INSTDIR\searches"
  File "..\searches\*.xml"
  
  SetOutPath "$INSTDIR\src"
  File "search.ico"
  File "search.nsi"
  File "build.cmd"
  File "clean.cmd"
  File "scrub.cmd"
  File "dqsd.xml"
  
  SetOutPath "$INSTDIR\src\DQSDTools"
  File "DQSDTools\DQSDTools.cpp"
  File "DQSDTools\DQSDTools.def"
  File "DQSDTools\DQSDTools.dep"
  File "DQSDTools\DQSDTools.dsp"
  File "DQSDTools\DQSDTools.dsw"
  File "DQSDTools\DQSDTools.idl"
  File "DQSDTools\DQSDTools.mak"
  File "DQSDTools\DQSDTools.rc"
  File "DQSDTools\Launcher.cpp"
  File "DQSDTools\Launcher.h"
  File "DQSDTools\Launcher.rgs"
  File "DQSDTools\MenuBuilder.rgs"
  File "DQSDTools\MenuBuilder.h"
  File "DQSDTools\MenuBuilder.cpp"
  File "DQSDTools\KeyboardHook.h"
  File "DQSDTools\KeyboardHook.cpp"
  File "DQSDTools\License.txt"
  File "DQSDTools\StdAfx.cpp"
  File "DQSDTools\StdAfx.h"
  File "DQSDTools\Utilities.h"
  File "DQSDTools\Utilities.cpp"
  File "DQSDTools\resource.h"

  ; Create files with user preferences if they don't exist
  SetOverwrite off
  SetOutPath "$INSTDIR"
  File "..\localaliases.txt"
  File "..\mrumenu.txt"
  File "..\localsearch.css"
  File "..\localprefs.js"
  
  ; Create subdirectory for user searches
  CreateDirectory "$INSTDIR\localsearches"
  SetOverwrite on

  ; Remove deprecated stuff
  Delete $INSTDIR\license.txt
  Delete $INSTDIR\search.ico
  Delete $INSTDIR\search.nsi
  Delete $INSTDIR\dqsd.xml
  Delete $INSTDIR\search.xml
  Delete $INSTDIR\xplocalsearch.css
  Delete $INSTDIR\xptoolbarbot.bmp
  Delete $INSTDIR\xptoolbartop.bmp
  Delete $INSTDIR\localsearch_default.css"
  Delete $INSTDIR\localsearch_silver.css"
  Delete $INSTDIR\localsearch_olive.css"
  Delete $INSTDIR\localsearch_blue.css"

  ; Remove stuff introduced by 3.1.8 beta-1
  Delete $INSTDIR\dqsd.gif
  Delete $INSTDIR\httpinst.js

  ; Old versions of searches to delete; most renamed or consolidated
  Delete $INSTDIR\searches\aim.xml
  Delete $INSTDIR\searches\ask.xml
  Delete $INSTDIR\searches\at.xml
  Delete $INSTDIR\searches\base.xml
  Delete $INSTDIR\searches\bible.xml
  Delete $INSTDIR\searches\cf.xml
  Delete $INSTDIR\searches\chart.xml
  Delete $INSTDIR\searches\day.xml
  Delete $INSTDIR\searches\drink.xml
  Delete $INSTDIR\searches\fc.xml
  Delete $INSTDIR\searches\foldoc.xml
  Delete $INSTDIR\searches\gga.xml
  Delete $INSTDIR\searches\ggi.xml
  Delete $INSTDIR\searches\ggc.xml
  Delete $INSTDIR\searches\ggn.xml
  Delete $INSTDIR\searches\gguk.xml
  Delete $INSTDIR\searches\gwd.xml
  Delete $INSTDIR\searches\ifl.xml
  Delete $INSTDIR\searches\law.xml
  Delete $INSTDIR\searches\lottery.xml
  Delete $INSTDIR\searches\mb.xml
  Delete $INSTDIR\searches\man.xml
  Delete $INSTDIR\searches\map.xml
  Delete $INSTDIR\searches\palm.xml
  Delete $INSTDIR\searches\phone.xml
  Delete $INSTDIR\searches\roman.xml
  Delete $INSTDIR\searches\sbb.xml
  Delete $INSTDIR\searches\sbc.xml
  Delete $INSTDIR\searches\sbp.xml
  Delete $INSTDIR\searches\short.xml
  Delete $INSTDIR\searches\slash.xml
  Delete $INSTDIR\searches\smlnk.xml
  Delete $INSTDIR\searches\start.xml
  Delete $INSTDIR\searches\tel.xml
  Delete $INSTDIR\searches\tvgc.xml
  Delete $INSTDIR\searches\webpoll.xml
  Delete $INSTDIR\searches\jsexec.xml
  Delete $INSTDIR\searches\timer.xml
  Delete $INSTDIR\searches\nwtsr.xml
  Delete $INSTDIR\searches\httpd.xml
  Delete $INSTDIR\searches\dicfr.xml

  ; Write the installation path into the registry
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}" "InstallDir" "$INSTDIR"

  ; ??? Keep this for a while for backward compatibility
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}" "SecureFile" "$INSTDIR\search.htm"
  WriteRegDWORD HKCR "CLSID\${DQSD_CLSID}\SecureFiles" "$INSTDIR\search.htm" 0
  WriteRegDWORD HKCR "CLSID\${DQSD_CLSID}\SecureFiles" "$INSTDIR\settings.htm" 0

  ; Registry settings needed to function
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}" "" "Quick Search"
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}" "MenuText" "Add Quick Search..."
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}" "HelpText" "${DQSD_TITLE}"
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}\Implemented 
Categories\{00021492-0000-0000-C000-000000000046}" "" ""
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}\InprocServer32" "" "$SYSDIR\shdocvw.dll"
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}\InprocServer32" "ThreadingModel" 
"Apartment"
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}\Instance" "CLSID" 
"{7BA4C742-9E81-11CF-99D3-00AA004AE837}"
  WriteRegStr HKCR "CLSID\${DQSD_CLSID}\Instance\InitPropertyBag" "Url" 
"$INSTDIR\search.htm"

  ; Add dqsd clsid to approved shell extensions - irrelevant on non-NT based OS 
- but doesn't hurt anything per
  ; 
http://msdn.microsoft.com/library/en-us/shellcc/platform/Shell/programmersguide/shell_int/shell_int_extending/extensionhandlers/shell_ext.asp
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved" "${DQSD_CLSID}" "${DQSD_TITLE}"

  ; Uninstallation keys
  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${DQSD_CLSID}" 
"DisplayName" "${DQSD_TITLE} (remove only)"
  WriteRegStr HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${DQSD_CLSID}" 
"UninstallString" '"$INSTDIR\uninstall.exe"'

  ; xp theme css installer
  Call GetWindowsXPTheme
  Pop $0
  StrCmp $0 "" doneXPTheme
  StrCmp $0 "blue" 0 +3
  CopyFiles /SILENT /FILESONLY $INSTDIR\theme_blue.css $INSTDIR\theme.css
  goto doneXPTheme
  StrCmp $0 "olive" 0 +3
  CopyFiles /SILENT /FILESONLY $INSTDIR\theme_olive.css $INSTDIR\theme.css
  goto doneXPTheme
  StrCmp $0 "silver" 0 +3
  CopyFiles /SILENT /FILESONLY $INSTDIR\theme_silver.css $INSTDIR\theme.css
  goto doneXPTheme
  doneXPTheme:

  ; Message box
  IfRebootFlag rebootmsg norebootmsg
    rebootmsg:
      MessageBox MB_YESNO|MB_ICONINFORMATION|MB_DEFBUTTON1 "The Deskbar has 
been upgraded.$\nYou must reboot before it will work correctly.$\nAfter 
rebooting, if the search bar$\nis not visible, 
${HOW_TO_TURN_ON_TOOLBAR}$\n$\nWould you like to reboot now (recommended)?" 
IDYES doreboot
      ; MessageBox MB_OK|MB_ICONINFORMATION "Please remember to reboot before 
using the search bar.$\n$\n${TITLE_AND_COPYRIGHT}"
      Goto endinstall
    
    norebootmsg:
      MessageBox MB_OK|MB_ICONINFORMATION "$8"
      Goto endinstall

    doreboot:
      Reboot

   endinstall:
SectionEnd

; uninstall stuff

UninstallText "Click next to uninstall ${DQSD_TITLE}."
UninstallIcon search.ico

; special uninstall section.
Section "Uninstall"

  ; Unregister DQSDTools
  UnRegDLL $INSTDIR\DQSDTools.dll

  ; remove approved shell extension regkey
  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Shell 
Extensions\Approved" "${DQSD_CLSID}"

  ; remove registry keys
  DeleteRegKey HKLM 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${DQSD_CLSID}"
  DeleteRegKey HKCR "CLSID\${DQSD_CLSID}"

  ; remove files
  Delete /REBOOTOK $INSTDIR\DQSDTools.dll
  Delete /REBOOTOK $INSTDIR\ChangeLog.txt
  Delete /REBOOTOK $INSTDIR\aliases.txt
  Delete /REBOOTOK $INSTDIR\calculate.js
  Delete /REBOOTOK $INSTDIR\calendar.js
  Delete /REBOOTOK $INSTDIR\categoryExpander.htc
  Delete /REBOOTOK $INSTDIR\clock.js
  Delete /REBOOTOK $INSTDIR\defer_tools.js
  Delete /REBOOTOK $INSTDIR\dqsd.png
  Delete /REBOOTOK $INSTDIR\helpbox.js
  Delete /REBOOTOK $INSTDIR\helpmenu.js
  Delete /REBOOTOK $INSTDIR\history.js
  Delete /REBOOTOK $INSTDIR\holidays.*.xml
  Delete /REBOOTOK $INSTDIR\loader.js
  Delete /REBOOTOK $INSTDIR\maximized.htm
  Delete /REBOOTOK $INSTDIR\menu.txt
  Delete /REBOOTOK $INSTDIR\readme.txt
  Delete /REBOOTOK $INSTDIR\savesearchsettings.js
  Delete /REBOOTOK $INSTDIR\search.css
  Delete /REBOOTOK $INSTDIR\search.htm
  Delete /REBOOTOK $INSTDIR\search.xml
  Delete /REBOOTOK $INSTDIR\strings.js
  Delete /REBOOTOK $INSTDIR\tools.js
  Delete /REBOOTOK $INSTDIR\translate.js
  Delete /REBOOTOK $INSTDIR\version.js
  Delete /REBOOTOK $INSTDIR\version.xml
  Delete /REBOOTOK $INSTDIR\versiondialog.htm
  Delete /REBOOTOK $INSTDIR\xptoolbar2_default.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar1_default.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar1_silver.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar2_silver.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar1_olive.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar2_olive.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar1_blue.bmp
  Delete /REBOOTOK $INSTDIR\xptoolbar2_blue.bmp
  Delete /REBOOTOK $INSTDIR\localsearch_default.css
  Delete /REBOOTOK $INSTDIR\localsearch_silver.css
  Delete /REBOOTOK $INSTDIR\localsearch_olive.css
  Delete /REBOOTOK $INSTDIR\localsearch_blue.css
  Delete /REBOOTOK $INSTDIR\preferences.js
  Delete /REBOOTOK $INSTDIR\uninstall.exe

; Ask to delete local files
  MessageBox MB_YESNO|MB_ICONINFORMATION|MB_DEFBUTTON2 "Uninstall local 
settings too?" IDYES fulluninstall IDNO partialuninstall
  fulluninstall:
  RmDir /r $INSTDIR

  
  partialuninstall:
  RmDir /r $INSTDIR\src
  RmDir /r $INSTDIR\searches
  RmDir /r $INSTDIR\addons

  ; Remove localsearches if it's empty (i.e. no /r)
  RmDir $INSTDIR\localsearches

  ; Remove install directory if it's empty (hardly ever will be)
  RmDir /REBOOTOK $INSTDIR

SectionEnd

Reply via email to