Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application and deployment wizard in VB

Status
Not open for further replies.

harish1977

Programmer
Apr 8, 2002
1
IN

I have a VB application and i want to bundle it as setup using package and deployment wizard . I also need to include a 3rd party setup files along with this .

I need to give the entire thing as a single exe . First my VB application should get installed and the 3 rd part setup i have included should get installed. Is there any way in package and delpoyment wizard to proceed for this requirement.
 
Yes, but it is a little involved.

PLEASE MAKE A BACKUP COPY OF THE ORIGINALS BEFORE YOU PROCEED DOWN THIS PATH.

If you look in the following directory (this is the default directory - yours may be different depending on where you installed VisStudio) you will find a project called SETUP1.

C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Setup1

You can modify the Setup1.frm code to perform additional tasks.

I have a modified a copy to automatically installs the MSActiveXControlPad at the completion of the install of this particular project.

BTW - I install this particular app because it will install the FM20.DLL which is necessary for the Forms 2.0 controls.

At the end of the Form_Load Event the code is as follows, the line in bold is the one that I added.

ExitSetup:
HideStaticMessageDialog
If fWithinAction() Then
'By now, all logging actions should have been either aborted or committed.
MsgError ResolveResString(resSTILLWITHINACTION), vbExclamation Or vbOKOnly, gstrTitle
ExitSetup Me, gintRET_FATAL
End If

InstallActiveControlPad gsDest.strAppDir

MoveAppRemovalFiles strGroupName

ExitSetup Me, gintRET_FINISHEDSUCCESS

MainError:
iRet = MsgError(Err.Description & vbLf & vbLf & ResolveResString(resUNEXPECTED), vbRetryCancel Or vbExclamation, gstrTitle)
If gfNoUserInput Then iRet = vbCancel
Select Case iRet
Case vbRetry
Resume
Case vbCancel
ExitSetup Me, gintRET_ABORT
Resume
End Select
End Sub

'-----------------------------------------------------------

And the subroutine is as follows:

'=========================================================

Private Sub InstallActiveControlPad(rStr_AppPath As String)

On Error Resume Next

Dim lStr_CommandLine As String
Dim lDbl_TaskID As Double
Dim lInt_FileNum As Integer
Dim lStr_Fm20File As String
Dim lBol_FileExists As Boolean

lInt_FileNum = FreeFile
If (Right(gstrWinSysDir, 1) <> &quot;\&quot;) Then
lStr_Fm20File = gstrWinSysDir & &quot;\fm20.dll&quot;
Else
lStr_Fm20File = gstrWinSysDir & &quot;fm20.dll&quot;
End If
' MsgBox &quot;App Path = &quot; & rStr_AppPath & &quot; : &quot; & lStr_Fm20File
Open lStr_Fm20File For Input As lInt_FileNum
lBol_FileExists = (Err.Number = 0)
Close #lInt_FileNum
If (lBol_FileExists = True) Then
' MsgBox &quot;Fm20.Dll Already on Machine&quot;
Else
If (Right(rStr_AppPath, 1) = &quot;\&quot;) Then
lStr_CommandLine = rStr_AppPath & &quot;setuppad.exe&quot;
Else
lStr_CommandLine = rStr_AppPath & &quot;\setuppad.exe&quot;
End If
lDbl_TaskID = Shell(lStr_CommandLine, vbMaximizedFocus)
' If (lDbl_TaskID = 0) Then
' MsgBox &quot;Unable to Execute SetUpPad&quot;
' Else
' MsgBox &quot;SetUpPad Fired off&quot;
' End If
End If

End Sub

'=========================================================

You can, of course, substitute you own code for your specific needs

AGAIN, SAVE A COPY THE ORIGINALS FIRST


Good Luck
------------
Select * from Users where Clue > 0
0 rows returned
 
A couple of other notes:

1). After you compile your new setup1.exe, you need to copy it up into the PDWizard directory. SAFE THE SETUP1.EXE that is already there, then copy your new one into place.

2). Be sure to include your addition progams (in my case, the setuppad.exe) on your disttribution media.

3). Previous threads have identified the known problems with the installation of the STDOLE2, OLEAUT32, and OLEPRO32 dlls, with version problems. If you look in the Redist directory, underneath PDWizard, you will find copies of these DLLs. SAVE FIRST, then you can put your own specific copies/versions of these DLLs in the Redist directory, and those will be the ones included with your installation.


Good Luck
------------
Select * from Users where Clue > 0
0 rows returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top