VERSION 5.00 Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL" Begin VB.Form InstallPage BackColor = &H00FFFFFF& Caption = "DRBL Helper" ClientHeight = 1935 ClientLeft = 4305 ClientTop = 5565 ClientWidth = 7560 Icon = "InstallPage.frx":0000 MaxButton = 0 'False ScaleHeight = 1935 ScaleWidth = 7560 Begin MSForms.CommandButton cmdExit Height = 375 Left = 6240 TabIndex = 8 Top = 1440 Width = 1215 Caption = "Exit" Size = "2143;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 ParagraphAlign = 3 End Begin MSForms.CommandButton cmdNext Height = 375 Left = 4920 TabIndex = 7 Top = 1440 Width = 1215 Caption = "Next" Size = "2143;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 ParagraphAlign = 3 End Begin MSForms.CommandButton cmdPrevious Height = 375 Left = 3600 TabIndex = 6 Top = 1440 Width = 1215 Caption = "Previous" Size = "2143;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 ParagraphAlign = 3 End Begin MSForms.CommandButton cmdRun Height = 375 Left = 1680 TabIndex = 5 Top = 960 Width = 2775 Caption = "Install image" Size = "4895;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 ParagraphAlign = 3 End Begin MSForms.CommandButton btnUpdate Height = 375 Left = 6000 TabIndex = 4 Top = 480 Width = 1455 Caption = "Browse" Size = "2566;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 ParagraphAlign = 3 End Begin MSForms.TextBox txtPath Height = 375 Left = 3600 TabIndex = 3 Top = 480 Width = 2295 VariousPropertyBits= 746604571 Size = "4048;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 End Begin MSForms.Label lbl3 Height = 495 Left = 1680 TabIndex = 2 Top = 480 Width = 1935 ForeColor = 12632064 BackColor = 16777215 VariousPropertyBits= 8388627 Caption = "Select Image" Size = "3413;873" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 End Begin MSForms.Label lbl2 Height = 255 Left = 3960 TabIndex = 1 Top = 120 Width = 1455 ForeColor = 16711680 BackColor = 16777215 VariousPropertyBits= 8388627 Size = "2566;450" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 End Begin MSForms.Label lbl1 Height = 375 Left = 1680 TabIndex = 0 Top = 120 Width = 2295 ForeColor = 12632064 BackColor = 16777215 VariousPropertyBits= 8388627 Caption = "USB flash drive" Size = "4048;661" FontName = "新細明體" FontHeight = 180 FontCharSet = 136 FontPitchAndFamily= 34 End Begin VB.Image Image1 Height = 1935 Left = 0 Picture = "InstallPage.frx":0CCA Stretch = -1 'True Top = 0 Width = 1935 End End Attribute VB_Name = "InstallPage" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim msg As String Private Sub btnUpdate_Click() Dim sFilter, TempPath As String 'set the filter: show text files and all the files sFilter = "Zip files (*.zip)|*.zip|All files (*.*)|*.*" 'let the user select a file, ensuring that it exists TempPath = ShowOpenFileDialog(sFilter, "txt", ".\", OFN_FILEMUSTEXIST) If TempPath <> "" Then txtPath.Text = TempPath End If End Sub Private Sub cmdExit_Click() If FormatPage.Visible = False Then Unload FormatPage End If If BootPage.Visible = False Then Unload BootPage End If If LanguagePage.Visible = False Then Unload LanguagePage End If Unload Me End Sub Private Sub cmdNext_Click() Me.Hide BootPage.Show End Sub Private Sub cmdPrevious_Click() Me.Hide FormatPage.Show End Sub Private Sub cmdRun_Click() If (Not FileExists(txtPath.Text)) Then 'MsgBox msg ReadyDialog.lblMsg.Caption = msg AlwaysOnTop ReadyDialog, True ReadyDialog.Show Exit Sub End If Dim strDir As String, tmpDir As String, strCmd As String, strCmdPrefix As String 'Create DRBLLive Disk strDir = "DRBLLive\" tmpDir = GetTempDir & strDir strCmdPrefix = "cmd /C" strCmd = strCmdPrefix & " md " & tmpDir ExecCmd strCmd args = "x """ & txtPath.Text & """ -o" & tmpDir & " -y " strCmd = """" & G_LibPath & "7za.exe"" " & args ExecCmd strCmd strCmd = strCmdPrefix & " xcopy /E /Y """ & tmpDir & "*"" " & GetDriveID & ":\" ExecCmd strCmd strCmd = strCmdPrefix & " rmdir /S /Q """ & tmpDir & """" ExecCmd strCmd ReadyDialog.lblMsg.Caption = GetString(13) AlwaysOnTop ReadyDialog, True ReadyDialog.Show End Sub Private Sub Form_Load() Me.Top = BootPage.Top Me.Left = BootPage.Left SetLocale End Sub Public Sub SetLocale() msg = "Please select the archive file of DRBLLive." lbl2.Caption = GetDriveID ' If (LoadLocalizedResources) Then ' Pull a string resource out of a local resource ' object for demonstration purposes. lbl1.Caption = GetString(5) lbl3.Caption = GetString(7) btnUpdate.Caption = GetString(9) cmdRun.Caption = GetString(8) cmdNext.Caption = GetString(3) cmdPrevious.Caption = GetString(16) cmdExit.Caption = GetString(4) 'Me.Caption = GetString() msg = GetString(10) End If End Sub Private Sub Form_Unload(Cancel As Integer) cmdExit_Click End Sub