Change order of the message ?
Hi all i got a little problem getting some message to display after another ?
here is what i got:
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Bobs Mappack 1.3"
!define PRODUCT_VERSION "1.3"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
SetCompressor /SOLID lzma
SetCompressorDictSize 64
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "English"
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------
Name "${PRODUCT_NAME}"
OutFile "C:\Bobs Mappack 1.3.exe"
ShowInstDetails show
ShowUnInstDetails show
Function .onInit
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\GhostRecon.exe" "path"
StrCmp $R0 "" NotPresent Present
notpresent:
StrCpy $INSTDIR "$programfiles\Red Storm Entertainment\Ghost Recon\Mods"
MessageBox MB_OK "Path to ghost recon was not found, plz verify this path, or browse to ghost recon\mods\ and install"
goto done
present:
strcpy $instdir $R0\Mods
done:
functionend
Section "MainSection" SEC01
SetOutPath "$INSTDIR\Bobs Mappack 1_3"
SetOverwrite on
File /r "G:\Ghost Recon\mods\Bobs Mappack 1_3\*.*"
sectionend
Section -AdditionalIcons
CreateDirectory "$SMPROGRAMS\Bobs Mappack 1.3"
CreateShortCut "$SMPROGRAMS\Bobs Mappack 1.3\Uninstall Bobs Mappack 1.3.lnk" "$INSTDIR\Remove_Bobs Mappack 1.3.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\Remove_Bobs Mappack 1.3.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\Remove_Bobs Mappack 1.3.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
SectionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section Uninstall
Delete "$SMPROGRAMS\Bobs Mappack 1.3\Bobs Mappack 1.3.lnk"
rmdir "$SMPROGRAMS\Bobs Mappack 1.3"
RMDIR /r "$INSTDIR\Bobs Mappack 1_3"
Delete "$INSTDIR\Remove_Bobs Mappack 1.3.exe"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
SetAutoClose true
SectionEnd
Problem is when i start the installer i get an error window saying "Path to ghost recon was not found, plz verify this path, or browse to ghost recon\mods\ and install" before all else in the installer.
Now error message is what i wanted, but can i have that error message saying it in the install path window?
so ppl just dident forget what they clicked ok to? ;)
so i want install path window to come first, then the error message ? can it be done ?