Thank bholliger for your reply,
I am so sorry about it.
My problem is : If old program is installed. I want to uninstall old version before I install new version.
After I finish uninstalling old version, my new program will execute. But my application is installed with multilanguage. If means it allows user to choose many language to install.
At that time, after uninstall successful, the page welcome is displayed with the same language which I choose to install in old version.
I only want to know how can I allow user to choose language to install after uninstalling old program.
My code here:
Function .onInit
Call Remove
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
Function Remove
ReadRegStr $R0 HKLM \
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"UninstallString"
StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"${PRODUCT_NAME} is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to cancel this upgrade." \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
Exec '$R0' ;Do not copy the uninstaller to a temp file
IfErrors no_remove_uninstaller
;You can either use Delete /REBOOTOK in the uninstaller or add some code
;here to remove the uninstaller. Use a registry key to check
;whether the user has chosen to uninstall. If you are using an uninstaller
;components page, make sure all sections are uninstalled.
no_remove_uninstaller:
done:
FunctionEnd
I also try put my code above and under !insertmacro MUI_LANGDLL_DISPLAYto display many languages for user choose to install.
I try all my word to explain, if you do not know, I will try it again
Thank you for your help,