Solved

VB3 - App Setup Wizard and ini files

Posted on 1998-09-16
2
235 Views
Last Modified: 2010-04-30
When using the VB3 app setup wizard I cannot seem to get it to install my app.ini file in the \windows directory.
It either goes in the \app directory - or if I include the
":1" switch then it goes in the \windows\system directory.
Neither of which is found when the program runs - obviously.
All this contains is the installable isam stuff for dbase.
0
Comment
Question by:Upland
2 Comments
 

Accepted Solution

by:
creisinger earned 100 total points
ID: 1435196
Hello Upland,

try this. It's not great but it will work.

After you have completed your installation disk(s) using the setup wizard go to subdirectory \SETUPKIT\SETUP1 from your vb 3.0 installation and open the SETUP1A.MAK. This project was created by setup wizard according to your project you want to distribute.

Make a backup of the fiel setup1a.frm

Then open the setup1a.frm, goto the form_load event and search for:
    '--------------------------------------------------
    ' File Copying is over, so unload the status dialog
    '--------------------------------------------------
    Unload StatusDlg

Before this code are the statements for copying the files to be distributed. According to this statements you can add something like the following code
If Not CopyFile(SourcePath$, windir$, "APP.IN_", "APP.INI") Then GoTo ErrorSetup

Now create a new setup1.exe.
Goto to the directory  \setupkit\kitfiles in your vb 3.0 directory) and compress your modified setup1.exe with the following dos-command
compress -r ..\setup1\setup1.exe
Use the previous command to compress also your app.ini file

Then replace the file setup1.ex_ on your distribution disk.
Next copy the app.in_ file on your last distribution disk.

Finally restore the setup1a.frm with your backup.

Hope that will help you

Greetings
0
 

Author Comment

by:Upland
ID: 1435197
Creisinger,
Thanks a lot... I have actually discovered another solution - in a roundabout way. I wrote a very short loader programme in vb which basically checks the windir$ for app.ini and if it doesn't exist then I create it (it's only a print# of 3 lines) and then call my original app (in the same directory) with a shell command. The loader app of course doesn't need an ini of its own.

The only thing to be careful of is that when you build the loader app with setup wizard that you include all the files required by the main app (vbx, dll, exe, dbf etc). The way to do this is to start by using setup wizard for your own app and then making a note of all the files it lists as required... then abort. Start new build for the loader app and then manually add all the other files.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now