Tang
17th August 2006 09:07 UTC
How to control page priority
Hello all:
I want to install Mysql and then create a database with it.before Creating the database,I need to get the root password from the custom page that user input.
But when I run it,the custom page display before nstalling the Mysql.So I can't even have the Mysql installed and don't create the database at all .How can I control them?
My script just like this:
...
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
;let user input the password
Page custom PGIni_DBPassword PGleave_DBPassword
!insertmacro MUI_PAGE_INSTFILES
section "Install Mysql"
...
sectionEnd
section "Create Database"
...
SectionEnd
Please can somebody take a minute to help me,thx in advance!I had tested with ExecPri::ExecWait ,but it does't work.
Tang
17th August 2006 10:01 UTC
I had use SetPriorityClass as below,but it does not work.Why? who can help me or give me some advice?
define NORMAL_PRIORITY_CLASS 0x00000020
!define IDLE_PRIORITY_CLASS 0x00000040
!define HIGH_PRIORITY_CLASS 0x00000080
!define REALTIME_PRIORITY_CLASS 0x00000100
System::Call "kernel32::GetCurrentProcess() i .s"
System::Call "kernel32::SetPriorityClass(i s, i ${HIGH_PRIORITY_CLASS})"
kichik
18th August 2006 11:51 UTC
The code in the sections is executed once the installer hits the instfiles page. Because of that, the code will not run until the user clicks the Install button and before all pages are passed.
You should save the result of the input page in a variable or simply keep the INI file stored in $PLUGINSDIR. In the section code, read that variable or the INI file and use it after the server starts running.
That SetPriorityClass call sets the priority for the installer. I don't see how it's related to your question.