pages/DatabaseConfig.nsi
changeset 2 0c0d5dadfca3
parent 0 67e1cc6cd929
child 3 0cce88c7cf7c
equal deleted inserted replaced
1:ac5bcb4e5284 2:0c0d5dadfca3
   123       StrCmp $db_password $R0 +3
   123       StrCmp $db_password $R0 +3
   124         MessageBox MB_OK|MB_ICONEXCLAMATION "The passwords you entered do not match. Please enter them again."
   124         MessageBox MB_OK|MB_ICONEXCLAMATION "The passwords you entered do not match. Please enter them again."
   125         Abort
   125         Abort
   126         
   126         
   127       ; If we're root, we can assume the login doesn't exist yet, so skip the validation
   127       ; If we're root, we can assume the login doesn't exist yet, so skip the validation
   128       IntCmp $db_needroot 0 +2
   128       IntCmp $db_needroot 0 +3
       
   129         LockWindow on
   129         Return
   130         Return
   130         
   131         
   131       ${db_connect} $R0 $db_user $db_password
   132       ${db_connect} $R0 $db_user $db_password
   132       IntCmp $R0 0 +3
   133       IntCmp $R0 0 +3
   133         ; Database auth failed
   134         ; Database auth failed
   142                                            Setup will not attempt to modify your existing database. If there is \
   143                                            Setup will not attempt to modify your existing database. If there is \
   143                                            already an installation of $(^Name) in the database, the installer will \
   144                                            already an installation of $(^Name) in the database, the installer will \
   144                                            fail. This option is recommended only for advanced users." IDYES +2
   145                                            fail. This option is recommended only for advanced users." IDYES +2
   145         Abort ; on No
   146         Abort ; on No
   146       
   147       
       
   148       LockWindow on
   147       Return
   149       Return
   148       
   150       
   149     GenerateRandomLogin:
   151     GenerateRandomLogin:
   150       StrCpy $db_name "bn_enanocms"
   152       StrCpy $db_name "bn_enanocms"
   151       StrCpy $db_user "bn_enanocms"
   153       StrCpy $db_user "bn_enanocms"
   152       Call GenerateRandomPassword
   154       Call GenerateRandomPassword
   153       Pop $db_password
   155       Pop $db_password
       
   156       LockWindow on
   154       Return
   157       Return
   155   
   158   
   156 FunctionEnd
   159 FunctionEnd
   157 
   160 
   158 Function GenerateRandomPassword
   161 Function GenerateRandomPassword