Public Jimbo As Integer
Public ProgramName As String
Private Sub form_load()
LblMain.Caption = "This program will install the files needed on your computer to run your application. Click next to continue..."
Command1.Caption = "Next..."
Me.Caption = "Setup..."
End Sub
Private Sub Command1_Click()
ProgramName = "report generation"
If Jimbo = 3 Then
Unload Me: End
Else
Jimbo = Jimbo + 1
Select Case Jimbo
Case 1
LblMain.Caption = "This Setup will install " & ProgramName & "project1.exe and other components. Please click next to continue."
Case 2
Make_Directories
LblMain.Caption = "Click Next to copy the files into the directory 'C:\REPORTS'"
Copy_Files
EditReg
Case 3
LblMain.Caption = "Setup Complete!": MsgBox "Complete!", , "": Command1.Caption = "Done"
End Select
End If
End Sub
Private Sub EditReg()
'This inserts files into the registry. e.g.
End Sub
Private Sub Copy_Files()
'This is where you put all the file copying Material
ChDir App.Path
FileCopy App.EXEName & ".exe", "C:\REPORTS\Program" & ProgramName & ".exe"
End Sub
Private Sub Make_Directories()
On Error Resume Next
MkDir "C:\REPORTS"
MkDir "C:\REPORTS\Setup"
MkDir "C:\REPORTS\Dll's"
MkDir "C:\REPORTS\Ocx's"
MkDir "C:\REPORTS\Program"
End Sub