pages/DatabaseConfig.nsi
author Dan
Sat, 11 Jul 2009 10:07:32 -0400
changeset 3 0cce88c7cf7c
parent 2 0c0d5dadfca3
child 10 014d58335b6d
permissions -rw-r--r--
Added Makefile
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     1
!macro ShowRange hwnd low high value
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     2
  !define tmp_id ${__LINE__}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     3
  StrCpy $R0 ${low}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     4
  loop.${tmp_id}:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     5
    GetDlgItem $R1 ${hwnd} $R0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     6
    ShowWindow $R1 ${value}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     7
    IntOp $R0 $R0 + 1
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     8
    IntCmp $R0 ${high} loop.${tmp_id} loop.${tmp_id}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     9
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    10
  !undef tmp_id
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    11
!macroend
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    12
!define ShowRange "!insertmacro ShowRange"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    13
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    14
Page custom DatabaseConfigCreate DatabaseConfigLeave " - Database configuration"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    15
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    16
Function DatabaseConfigCreate
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    17
  StrCmp $XPUI_ABORTED 1 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    18
    Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    19
  !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\DatabaseConfig.ini" "DatabaseConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    20
  !insertmacro XPUI_HEADER_TEXT "Database configuration" "Configure how $(^Name) will access your database."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    21
  WriteINIStr "$PLUGINSDIR\DatabaseConfig.ini" "Field 9" "Text" \
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    22
    "$(^Name) needs database access to work properly. Setup can create a database for you if you provide \
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    23
     $db_dbmsname's administration password, or you can choose to enter credentials for a database that already exists."
3
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    24
     
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    25
  StrCpy $R2 0 ; Hide manual credential items
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    26
  StrCpy $R3 0 ; Hide root password/set manual to disabled
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    27
     
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    28
  ; if the back button was clicked we might have use manual checked
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    29
  ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 3" "State"
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    30
  IntCmp $0 1 UseManualIsOn
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    31
  
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    32
    StrCpy $R2 1
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    33
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    34
  UseManualIsOn:
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    35
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    36
    ; do we need to disable the checkbox?
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    37
    ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 2" "State"
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    38
    IntCmp $0 1   0 ShowDialog ShowDialog
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    39
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    40
      StrCpy $R3 1
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    41
      
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    42
  ShowDialog:
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    43
    
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    44
  !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG "DatabaseConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    45
  Pop $XPUI_HWND
3
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    46
  
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    47
  IntCmp $R2 1 "" SkipHideManual
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    48
  
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    49
    ${ShowRange} $XPUI_HWND 1204 1207 ${SW_HIDE}
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    50
    ${ShowRange} $XPUI_HWND 1210 1213 ${SW_HIDE}
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    51
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    52
  SkipHideManual:
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    53
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    54
  IntCmp $R3 1 "" SkipForceManual
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    55
3
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    56
    ; check the box and disable
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    57
    GetDlgItem $0 $XPUI_HWND 1202
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    58
    SendMessage $0 ${BM_SETCHECK} ${BST_CHECKED} 0
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    59
    EnableWindow $0 0
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    60
    
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    61
    ; hide the root password, enter manually is selected
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    62
    GetDlgItem $0 $XPUI_HWND 1203
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    63
    ShowWindow $0 ${SW_HIDE}
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    64
    GetDlgItem $0 $XPUI_HWND 1209
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    65
    ShowWindow $0 ${SW_HIDE}
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    66
3
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    67
  SkipForceManual:
0cce88c7cf7c Added Makefile
Dan
parents: 2
diff changeset
    68
    
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    69
  !insertmacro XPUI_INSTALLOPTIONS_SHOW
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    70
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    71
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    72
Function DatabaseConfigLeave
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    73
  StrCmp $XPUI_ABORTED 1 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    74
    Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    75
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    76
  ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Settings" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    77
  StrCmp $0 1 RadioButtonClicked
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    78
  StrCmp $0 2 RadioButtonClicked
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    79
  StrCmp $0 3 UseManualClicked
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    80
  Goto NextClicked
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    81
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    82
  RadioButtonClicked:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    83
    LockWindow on
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    84
    ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 1" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    85
    IntCmp $0 0 SetUseExisting
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    86
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    87
      ; Show root password
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    88
      GetDlgItem $0 $XPUI_HWND 1203
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    89
      ShowWindow $0 ${SW_SHOW}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    90
      GetDlgItem $0 $XPUI_HWND 1209
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    91
      ShowWindow $0 ${SW_SHOW}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    92
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    93
      GetDlgItem $0 $XPUI_HWND 1202 ; Checkbox
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    94
      SendMessage $0 ${BM_SETCHECK} ${BST_UNCHECKED} 0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    95
      EnableWindow $0 1
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    96
      ${ShowRange} $XPUI_HWND 1204 1207 ${SW_HIDE}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    97
      ${ShowRange} $XPUI_HWND 1210 1213 ${SW_HIDE}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    98
      LockWindow off
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    99
      Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   100
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   101
    SetUseExisting:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   102
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   103
      ; Hide root password
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   104
      GetDlgItem $0 $XPUI_HWND 1203
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   105
      ShowWindow $0 ${SW_HIDE}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   106
      GetDlgItem $0 $XPUI_HWND 1209
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   107
      ShowWindow $0 ${SW_HIDE}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   108
      
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   109
      GetDlgItem $0 $XPUI_HWND 1202 ; Checkbox
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   110
      SendMessage $0 ${BM_SETCHECK} ${BST_CHECKED} 0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   111
      EnableWindow $0 0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   112
      ${ShowRange} $XPUI_HWND 1204 1207 ${SW_SHOW}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   113
      ${ShowRange} $XPUI_HWND 1210 1213 ${SW_SHOW}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   114
      LockWindow off
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   115
      Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   116
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   117
  UseManualClicked:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   118
    ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 3" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   119
    IntOp $0 $0 * ${SW_SHOW}
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   120
    ${ShowRange} $XPUI_HWND 1204 1207 $0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   121
    ${ShowRange} $XPUI_HWND 1210 1213 $0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   122
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   123
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   124
  NextClicked:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   125
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   126
    ; Figure out how we want to go about this.
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   127
    StrCpy $db_needroot 0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   128
    ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 1" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   129
    IntCmp $0 0 UseCustomLogin
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   130
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   131
      ; Validate based on root password.
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   132
      StrCpy $db_needroot 1
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   133
      ReadINIStr $db_rootpass "$PLUGINSDIR\DatabaseConfig.ini" "Field 4" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   134
      ${db_connect} $1 "$db_rootuser" "$db_rootpass"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   135
      IntCmp $1 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   136
        MessageBox MB_OK|MB_ICONEXCLAMATION "The $db_dbmsname root password you entered is incorrect. Please re-enter it."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   137
        Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   138
        
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   139
      ; Does the user have their own credentials?
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   140
      ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 3" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   141
      IntCmp $0 0 GenerateRandomLogin
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   142
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   143
    UseCustomLogin:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   144
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   145
      ; Pull database settings from dialog
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   146
      ReadINIStr $db_name "$PLUGINSDIR\DatabaseConfig.ini" "Field 5" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   147
      ReadINIStr $db_user "$PLUGINSDIR\DatabaseConfig.ini" "Field 6" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   148
      ReadINIStr $db_password "$PLUGINSDIR\DatabaseConfig.ini" "Field 7" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   149
      ReadINIStr $R0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 8" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   150
      
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   151
      ; Check password length
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   152
      ; but don't if the user entered credentials that already exist
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   153
      IntCmp $db_needroot 0 SkipLengthCheck
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   154
        StrLen $R1 $R0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   155
        IntCmp $R1 6 +3 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   156
          MessageBox MB_OK|MB_ICONEXCLAMATION "Please choose a database password that is at least 6 characters in length."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   157
          Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   158
          
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   159
      SkipLengthCheck:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   160
      ; Check password/confirm fields
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   161
      StrCmp $db_password $R0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   162
        MessageBox MB_OK|MB_ICONEXCLAMATION "The passwords you entered do not match. Please enter them again."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   163
        Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   164
        
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   165
      ; If we're root, we can assume the login doesn't exist yet, so skip the validation
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
   166
      IntCmp $db_needroot 0 +3
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
   167
        LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   168
        Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   169
        
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   170
      ${db_connect} $R0 $db_user $db_password
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   171
      IntCmp $R0 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   172
        ; Database auth failed
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   173
        MessageBox MB_OK|MB_ICONEXCLAMATION "The username and password you entered are invalid. Please enter them again."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   174
        Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   175
        
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   176
      ; This can be an error-prone process because entering credentials manually will keep
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   177
      ; the installer from touching the database. If tables already exist, Enano's installer
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   178
      ; will throw an error. Confirm this with the user.
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   179
      MessageBox MB_YESNO|MB_ICONQUESTION "Do you really want to use manual database settings?$\r$\n\
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   180
                                           $\r$\n\
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   181
                                           Setup will not attempt to modify your existing database. If there is \
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   182
                                           already an installation of $(^Name) in the database, the installer will \
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   183
                                           fail. This option is recommended only for advanced users." IDYES +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   184
        Abort ; on No
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   185
      
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
   186
      LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   187
      Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   188
      
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   189
    GenerateRandomLogin:
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   190
      StrCpy $db_name "bn_enanocms"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   191
      StrCpy $db_user "bn_enanocms"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   192
      Call GenerateRandomPassword
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   193
      Pop $db_password
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
   194
      LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   195
      Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   196
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   197
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   198
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   199
Function GenerateRandomPassword
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   200
  SetOutPath $PLUGINSDIR
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   201
  File "inst-resources\randompass.php"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   202
  nsExec::ExecToStack '"$stack_instdir\php\php.exe" "$PLUGINSDIR\randompass.php"'
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   203
  Pop $R0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
   204
FunctionEnd