Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

VB3 - App Setup Wizard and ini files

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
Upland
Asked:
Upland
1 Solution
 
creisingerCommented:
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
 
UplandAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now