[13] | 1 | VERSION 5.00
|
---|
| 2 | Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
|
---|
| 3 | Begin VB.Form InstallPage
|
---|
| 4 | BackColor = &H00FFFFFF&
|
---|
| 5 | Caption = "DRBL Helper"
|
---|
| 6 | ClientHeight = 1935
|
---|
| 7 | ClientLeft = 4305
|
---|
| 8 | ClientTop = 5565
|
---|
| 9 | ClientWidth = 7560
|
---|
| 10 | Icon = "InstallPage.frx":0000
|
---|
| 11 | MaxButton = 0 'False
|
---|
| 12 | ScaleHeight = 1935
|
---|
| 13 | ScaleWidth = 7560
|
---|
| 14 | Begin MSForms.CommandButton cmdExit
|
---|
| 15 | Height = 375
|
---|
| 16 | Left = 6240
|
---|
| 17 | TabIndex = 8
|
---|
| 18 | Top = 1440
|
---|
| 19 | Width = 1215
|
---|
| 20 | Caption = "Exit"
|
---|
| 21 | Size = "2143;661"
|
---|
| 22 | FontName = "·s²Ó©úÅé"
|
---|
| 23 | FontHeight = 180
|
---|
| 24 | FontCharSet = 136
|
---|
| 25 | FontPitchAndFamily= 34
|
---|
| 26 | ParagraphAlign = 3
|
---|
| 27 | End
|
---|
| 28 | Begin MSForms.CommandButton cmdNext
|
---|
| 29 | Height = 375
|
---|
| 30 | Left = 4920
|
---|
| 31 | TabIndex = 7
|
---|
| 32 | Top = 1440
|
---|
| 33 | Width = 1215
|
---|
| 34 | Caption = "Next"
|
---|
| 35 | Size = "2143;661"
|
---|
| 36 | FontName = "·s²Ó©úÅé"
|
---|
| 37 | FontHeight = 180
|
---|
| 38 | FontCharSet = 136
|
---|
| 39 | FontPitchAndFamily= 34
|
---|
| 40 | ParagraphAlign = 3
|
---|
| 41 | End
|
---|
| 42 | Begin MSForms.CommandButton cmdPrevious
|
---|
| 43 | Height = 375
|
---|
| 44 | Left = 3600
|
---|
| 45 | TabIndex = 6
|
---|
| 46 | Top = 1440
|
---|
| 47 | Width = 1215
|
---|
| 48 | Caption = "Previous"
|
---|
| 49 | Size = "2143;661"
|
---|
| 50 | FontName = "·s²Ó©úÅé"
|
---|
| 51 | FontHeight = 180
|
---|
| 52 | FontCharSet = 136
|
---|
| 53 | FontPitchAndFamily= 34
|
---|
| 54 | ParagraphAlign = 3
|
---|
| 55 | End
|
---|
| 56 | Begin MSForms.CommandButton cmdRun
|
---|
| 57 | Height = 375
|
---|
| 58 | Left = 1680
|
---|
| 59 | TabIndex = 5
|
---|
| 60 | Top = 960
|
---|
| 61 | Width = 2775
|
---|
| 62 | Caption = "Install image"
|
---|
| 63 | Size = "4895;661"
|
---|
| 64 | FontName = "·s²Ó©úÅé"
|
---|
| 65 | FontHeight = 180
|
---|
| 66 | FontCharSet = 136
|
---|
| 67 | FontPitchAndFamily= 34
|
---|
| 68 | ParagraphAlign = 3
|
---|
| 69 | End
|
---|
| 70 | Begin MSForms.CommandButton btnUpdate
|
---|
| 71 | Height = 375
|
---|
| 72 | Left = 6000
|
---|
| 73 | TabIndex = 4
|
---|
| 74 | Top = 480
|
---|
| 75 | Width = 1455
|
---|
| 76 | Caption = "Browse"
|
---|
| 77 | Size = "2566;661"
|
---|
| 78 | FontName = "·s²Ó©úÅé"
|
---|
| 79 | FontHeight = 180
|
---|
| 80 | FontCharSet = 136
|
---|
| 81 | FontPitchAndFamily= 34
|
---|
| 82 | ParagraphAlign = 3
|
---|
| 83 | End
|
---|
| 84 | Begin MSForms.TextBox txtPath
|
---|
| 85 | Height = 375
|
---|
| 86 | Left = 3600
|
---|
| 87 | TabIndex = 3
|
---|
| 88 | Top = 480
|
---|
| 89 | Width = 2295
|
---|
| 90 | VariousPropertyBits= 746604571
|
---|
| 91 | Size = "4048;661"
|
---|
| 92 | FontName = "·s²Ó©úÅé"
|
---|
| 93 | FontHeight = 180
|
---|
| 94 | FontCharSet = 136
|
---|
| 95 | FontPitchAndFamily= 34
|
---|
| 96 | End
|
---|
| 97 | Begin MSForms.Label lbl3
|
---|
| 98 | Height = 495
|
---|
| 99 | Left = 1680
|
---|
| 100 | TabIndex = 2
|
---|
| 101 | Top = 480
|
---|
| 102 | Width = 1935
|
---|
| 103 | ForeColor = 12632064
|
---|
| 104 | BackColor = 16777215
|
---|
| 105 | VariousPropertyBits= 8388627
|
---|
| 106 | Caption = "Select Image"
|
---|
| 107 | Size = "3413;873"
|
---|
| 108 | FontName = "·s²Ó©úÅé"
|
---|
| 109 | FontHeight = 180
|
---|
| 110 | FontCharSet = 136
|
---|
| 111 | FontPitchAndFamily= 34
|
---|
| 112 | End
|
---|
| 113 | Begin MSForms.Label lbl2
|
---|
| 114 | Height = 255
|
---|
| 115 | Left = 3960
|
---|
| 116 | TabIndex = 1
|
---|
| 117 | Top = 120
|
---|
| 118 | Width = 1455
|
---|
| 119 | ForeColor = 16711680
|
---|
| 120 | BackColor = 16777215
|
---|
| 121 | VariousPropertyBits= 8388627
|
---|
| 122 | Size = "2566;450"
|
---|
| 123 | FontName = "·s²Ó©úÅé"
|
---|
| 124 | FontHeight = 180
|
---|
| 125 | FontCharSet = 136
|
---|
| 126 | FontPitchAndFamily= 34
|
---|
| 127 | End
|
---|
| 128 | Begin MSForms.Label lbl1
|
---|
| 129 | Height = 375
|
---|
| 130 | Left = 1680
|
---|
| 131 | TabIndex = 0
|
---|
| 132 | Top = 120
|
---|
| 133 | Width = 2295
|
---|
| 134 | ForeColor = 12632064
|
---|
| 135 | BackColor = 16777215
|
---|
| 136 | VariousPropertyBits= 8388627
|
---|
| 137 | Caption = "USB flash drive"
|
---|
| 138 | Size = "4048;661"
|
---|
| 139 | FontName = "·s²Ó©úÅé"
|
---|
| 140 | FontHeight = 180
|
---|
| 141 | FontCharSet = 136
|
---|
| 142 | FontPitchAndFamily= 34
|
---|
| 143 | End
|
---|
| 144 | Begin VB.Image Image1
|
---|
| 145 | Height = 1935
|
---|
| 146 | Left = 0
|
---|
| 147 | Picture = "InstallPage.frx":0CCA
|
---|
| 148 | Stretch = -1 'True
|
---|
| 149 | Top = 0
|
---|
| 150 | Width = 1935
|
---|
| 151 | End
|
---|
| 152 | End
|
---|
| 153 | Attribute VB_Name = "InstallPage"
|
---|
| 154 | Attribute VB_GlobalNameSpace = False
|
---|
| 155 | Attribute VB_Creatable = False
|
---|
| 156 | Attribute VB_PredeclaredId = True
|
---|
| 157 | Attribute VB_Exposed = False
|
---|
| 158 | Dim msg As String
|
---|
| 159 |
|
---|
| 160 | Private Sub btnUpdate_Click()
|
---|
| 161 | Dim sFilter, TempPath As String
|
---|
| 162 | 'set the filter: show text files and all the files
|
---|
| 163 | sFilter = "Zip files (*.zip)|*.zip|All files (*.*)|*.*"
|
---|
| 164 | 'let the user select a file, ensuring that it exists
|
---|
| 165 | TempPath = ShowOpenFileDialog(sFilter, "txt", ".\", OFN_FILEMUSTEXIST)
|
---|
| 166 | If TempPath <> "" Then
|
---|
| 167 | txtPath.Text = TempPath
|
---|
| 168 | End If
|
---|
| 169 | End Sub
|
---|
| 170 |
|
---|
| 171 | Private Sub cmdExit_Click()
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 |
|
---|
| 175 | If FormatPage.Visible = False Then
|
---|
| 176 | Unload FormatPage
|
---|
| 177 | End If
|
---|
| 178 |
|
---|
| 179 | If BootPage.Visible = False Then
|
---|
| 180 | Unload BootPage
|
---|
| 181 | End If
|
---|
| 182 |
|
---|
| 183 | If LanguagePage.Visible = False Then
|
---|
| 184 | Unload LanguagePage
|
---|
| 185 | End If
|
---|
| 186 |
|
---|
| 187 |
|
---|
| 188 | Unload Me
|
---|
| 189 |
|
---|
| 190 | End Sub
|
---|
| 191 |
|
---|
| 192 |
|
---|
| 193 | Private Sub cmdNext_Click()
|
---|
| 194 | Me.Hide
|
---|
| 195 | BootPage.Show
|
---|
| 196 | End Sub
|
---|
| 197 |
|
---|
| 198 | Private Sub cmdPrevious_Click()
|
---|
| 199 | Me.Hide
|
---|
| 200 | FormatPage.Show
|
---|
| 201 | End Sub
|
---|
| 202 |
|
---|
| 203 | Private Sub cmdRun_Click()
|
---|
| 204 | If (Not FileExists(txtPath.Text)) Then
|
---|
| 205 | 'MsgBox msg
|
---|
| 206 | ReadyDialog.lblMsg.Caption = msg
|
---|
| 207 | AlwaysOnTop ReadyDialog, True
|
---|
| 208 | ReadyDialog.Show
|
---|
| 209 | Exit Sub
|
---|
| 210 | End If
|
---|
| 211 |
|
---|
| 212 | Dim strDir As String, tmpDir As String, strCmd As String, strCmdPrefix As String
|
---|
| 213 |
|
---|
| 214 | 'Create DRBLLive Disk
|
---|
| 215 | strDir = "DRBLLive\"
|
---|
| 216 | tmpDir = GetTempDir & strDir
|
---|
| 217 | strCmdPrefix = "cmd /C"
|
---|
| 218 |
|
---|
| 219 | strCmd = strCmdPrefix & " md " & tmpDir
|
---|
| 220 | ExecCmd strCmd
|
---|
| 221 |
|
---|
| 222 |
|
---|
| 223 | args = "x """ & txtPath.Text & """ -o" & tmpDir & " -y "
|
---|
| 224 | strCmd = """" & G_LibPath & "7za.exe"" " & args
|
---|
| 225 | ExecCmd strCmd
|
---|
| 226 |
|
---|
| 227 |
|
---|
| 228 | strCmd = strCmdPrefix & " xcopy /E /Y """ & tmpDir & "*"" " & GetDriveID & ":\"
|
---|
| 229 | ExecCmd strCmd
|
---|
| 230 |
|
---|
| 231 |
|
---|
| 232 | strCmd = strCmdPrefix & " rmdir /S /Q """ & tmpDir & """"
|
---|
| 233 | ExecCmd strCmd
|
---|
| 234 |
|
---|
| 235 | ReadyDialog.lblMsg.Caption = GetString(13)
|
---|
| 236 | AlwaysOnTop ReadyDialog, True
|
---|
| 237 | ReadyDialog.Show
|
---|
| 238 | End Sub
|
---|
| 239 |
|
---|
| 240 | Private Sub Form_Load()
|
---|
| 241 | Me.Top = BootPage.Top
|
---|
| 242 | Me.Left = BootPage.Left
|
---|
| 243 | SetLocale
|
---|
| 244 | End Sub
|
---|
| 245 |
|
---|
| 246 | Public Sub SetLocale()
|
---|
| 247 | msg = "Please select the archive file of DRBLLive."
|
---|
| 248 |
|
---|
| 249 | lbl2.Caption = GetDriveID
|
---|
| 250 | '
|
---|
| 251 | If (LoadLocalizedResources) Then
|
---|
| 252 | ' Pull a string resource out of a local resource
|
---|
| 253 | ' object for demonstration purposes.
|
---|
| 254 | lbl1.Caption = GetString(5)
|
---|
| 255 | lbl3.Caption = GetString(7)
|
---|
| 256 | btnUpdate.Caption = GetString(9)
|
---|
| 257 | cmdRun.Caption = GetString(8)
|
---|
| 258 | cmdNext.Caption = GetString(3)
|
---|
| 259 | cmdPrevious.Caption = GetString(16)
|
---|
| 260 | cmdExit.Caption = GetString(4)
|
---|
| 261 | 'Me.Caption = GetString()
|
---|
| 262 | msg = GetString(10)
|
---|
| 263 | End If
|
---|
| 264 |
|
---|
| 265 | End Sub
|
---|
| 266 |
|
---|
| 267 | Private Sub Form_Unload(Cancel As Integer)
|
---|
| 268 | cmdExit_Click
|
---|
| 269 | End Sub
|
---|
| 270 |
|
---|