|
|
#1 |
|
Junior Member
Join Date: Jul 2008
Posts: 3
|
Restart Section
Hi!
I`ve been looking at some advises here, but they didn`t help me a lot. So maybe somebody else can help me. My installer checks the installation path, and if it is a forbidden path, it stops the installation. What i`ve been trying to do, is when the installer is stopped, it goes back to the DIRECTORY page and asks the user to select another path. I`m using this code: Function RelGotoPage IntCmp $R9 0 0 Move Move StrCmp $R9 "X" 0 Move StrCpy $R9 "120" Move: SendMessage $HWNDPARENT "0x408" "$R9" "" FunctionEnd !macro BadPathsCheck StrCpy $R0 $INSTDIR "" -2 StrCmp $R0 ":\" bad StrCpy $R0 $INSTDIR "" -14 StrCmp $R0 "\Program Files" bad StrCpy $R0 $INSTDIR "" -8 StrCmp $R0 "\Windows" bad StrCpy $R0 $INSTDIR "" -6 StrCmp $R0 "\WinNT" bad StrCpy $R0 $INSTDIR "" -9 StrCmp $R0 "\system32" bad StrCpy $R0 $INSTDIR "" -8 StrCmp $R0 "\Desktop" bad StrCpy $R0 $INSTDIR "" -22 StrCmp $R0 "\Documents and Settings" bad StrCpy $R0 $INSTDIR "" -13 StrCmp $R0 "\My Documents" bad good bad: MessageBox MB_OK|MB_ICONSTOP "Install path invalid! You should chose another install path." StrCpy $R9 -1 ;Goto the next page Call RelGotoPage good: !macroend Section InstallComponents !insert BadPathsCheck ... Some code here that installs files... SectionEnd The point is, that ( maybe i`m mistaken, but i keep getting errors ) Section continues to execute installation of the files, even though it shows the Directory page. Is there a way to make the Section restart, or pause? |
|
|
|
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|