?
Solved

Intranet Applications & Ini Files

Posted on 1998-07-06
6
Medium Priority
?
182 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
Independent Software Vendors: 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 300 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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 Month12 days, 10 hours left to enroll

777 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