Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual Basic (Classic) FAQ

Package Deployment

How to add a Disclaimer/License screen to PDW by MattBegg
Posted: 12 Jun 01

Here is a way to add an "I accept" / "I do not accept" disclaimer or license screen to Package and deployment wizard

Firstly package your project with package and deployment wizard

Next make you disclaimer or license file as a text file, call it say disclaimer.txt and add it to the support directory that PDW creates

Edit setup.lst in notepad to add the disclaimer text file to the bootstrap

File7=@msvbvm60.dll,$(WinSysPathSysFile),$(DLLSelfRegister),,5/27/00 12:00:00 AM,1388544,
File8=@disclaimer.txt,$(WinSysPath),,,6/12/01 1:26:00 PM,

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

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
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
    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$

End Function

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.

You now have a license / disclaimer form

Hope this may be of some use


Back to Visual Basic (Classic) FAQ Index
Back to Visual Basic (Classic) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close