Solved

VB3 - App Setup Wizard and ini files

Posted on 1998-09-16
2
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses
Course of the Month3 days, 17 hours left to enroll

630 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