Solved

Intranet Applications & Ini Files

Posted on 1998-07-06
6
176 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

743 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

14 Experts available now in Live!

Get 1:1 Help Now