Solved

Intranet Applications & Ini Files

Posted on 1998-07-06
6
180 Views
Last Modified: 2010-05-03
I am trying to create an active document application that can be downloaded from an intranet server and run in a browser. I have created a CAB file and placed it on the server and everything seems to be OK.......However, the application requires an ini file and I can't seem to be able to get the ini file to be downloaded from the CAB into a specified directory. (i.e. I need a file e.g 'app.ini' to be downloaded fom the CAB file and stored in e.g 'C:\Apps\MyApp', whilst being upgraded when necessary.)

(I'm using Visual Basic 5.0 and I'm creating the CAB file using the Application Setup Wizard having selected internet setup.)

Any ideas? (I've tried amending the .INF file and rebuilding the CAB but it doesn't seem to do any good.)
0
Comment
Question by:martin_ford
[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
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:peterwest
ID: 1465020
Hmmm,

Rather than using an INI file why don't you modify the app so that it write's it's keys to the registry the first time it is run.

Pete

P.S. When you created the setup did you specify the .INI file as an additional component; if not, try recreating the CAB file using the Setup Wizard and specify the .INI as an extra component.
0
 
LVL 2

Expert Comment

by:peterwest
ID: 1465021
Hi again,

You can actually force the setup wizard to detect your ini file as a component by creation a dummy API declaration; simply put the following in your programme (in general declarations in a module):

Declare Function DummyFunc() Lib "[Location & Filename of INI File]"

This function won't be used but the setup wizard will look at the library specified and include it anyway!!!

Pete

0
 

Author Comment

by:martin_ford
ID: 1465022
Hi Pete,

I added the INI file as an extra component and (according to the INF file) it was added to the CAB but for some reason it doesn't get downloaded? I have also tried saving the properties to the documents property bag but this requires you to save a copy of the user document locally. Since I need an app that users can run straight from the server rather than  pointing them to a local instance I gave up with it. I'm not sure how to read and write from the registry so I haven't tried it.

Martin
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
anthonyc earned 100 total points
ID: 1465023
Reading and writing from the registry is easy.  Well, reading/writing to where VB wants to let you is easy.  Writing to where you want is a little more difficult, but for what you want, the VB method will be sufficient.  

Take a look at GetSetting, SaveSetting, and DeleteSetting in help.  They are JUST like INI file operations.
0
 
LVL 2

Expert Comment

by:peterwest
ID: 1465024
Hi,

I was gonna post details on using the registry but it looks like someone beat me to it!!!

Pete
0
 

Author Comment

by:martin_ford
ID: 1465025
Thanks guys! You're right, it is just as easy as using an INI file.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

749 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