I am not sure that the disclaimer needs the date stamp, but I have included it :)
Next edit <appname>.ddf in notepad to ensure that the batch file includes the text file in the cab file
.Set Cabinet=on .Set Compress=on "disclaimer.txt"
Next step go to c:\program files\microsoft visual studio\vb98\wizards\pdwizard\ and make a back up of the setup1 directory.
Open up the setup1 directory and open up the setup1.vbp project file.
In the code for the frmsetup1 find the line which reads ShowWelcomeForm Comment it out and enter ShowDisclaimerForm above it.
Next enter a new procedure for the ShowDisclaimerForm at the end of the code for frmsetup1
Private Sub ShowDisclaimer() If Not gfNoUserInput Then frmDisclaimer.Show vbModal End If End Sub
Add a new form to the project and call it frmDisclaimer add to it a text box (text1), a frame with 2 option buttons (option1(0) and option1(1)) and 2 command buttons cmdNext (caption = "Next>>") and cmdClose.
Add the following code to the form
Private Sub cmdNext_Click() Unload Me frmSetup1.ShowWelcomeForm End Sub
Private Sub CmdClose_Click() ExitSetup Me, gintRET_EXIT End Sub
Private Sub Form_Load() Option1(1).Value = True cmdNext.Enabled = False Text1.Text = gettext(gstrWinSysDir & "disclaimer.txt") End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) HandleFormQueryUnload UnloadMode, Cancel, Me End Sub
Private Sub Option1_Click(Index As Integer) If Option1(0).Value = True Then cmdNext.Enabled = True Else cmdNext.Enabled = False End If End Sub
Private Function gettext(FileName As String) As String
FF = FreeFile Open FileName For Binary As #FF ReadText$ = String$(LOF(FF), 32) Get #FF, 1, ReadText$ Close #FF gettext = ReadText$
Save the project and write the exe saving it to the directory you have been working in so that it does not overwrite the default setup1.exe
Copy the newly compiled setup1.exe to your support directory for your application.
Run the batch file
What happens is that in the boot strap the text file is copied to the windows\system directory and then read in by the form.