Solved

How to make VB setup Program

Posted on 1998-08-31
2
509 Views
Last Modified: 2012-05-04
I have one VB application with crystal reports. I want to make a setup file so that I can run this file on different machines by doubleclicking the setup file.

I want my application (which calls Crystal Reports) to be independent of path. I would like following steps for the setup file :
1) On doubleclicking, setup program must ask the path where the application is to be stored
2) copy VBapplicationexe file (say 'Myappl.exe') and crystal report files ( say '*.rpt')
3) update Autoexec.bat and append path with the Path from step 1.

I will appreciate an early reply
Thanks


0
Comment
Question by:rolee
2 Comments
 

Expert Comment

by:rikonigsberg
ID: 1432083
Why do you want to append the path with your app? What do you expect to achieve by doing that?

RK

0
 
LVL 1

Accepted Solution

by:
jf26028 earned 40 total points
ID: 1432084
1)  The easiest way to allow the users to enter the path of the executeable is to give them a standard Drive/Folder/File menu and let them browse for the path.  

2) Use the following code to copy the files if the install files are in the same path location as the executeable.

    FileCopy app.path & \Myapp1.exe", PathFromForm1 & "\Myapp1.exe"
   
You can use this code to copy all of your reports files, but it doesnt accept wildcards (*.*).

3) Use this code...

Open "c:\autoexec.bat" for append as #1
print #1, "path = %path%;" & PathFromForm1
close #1

This will update the path to include your app path.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question