Solved

Intranet Applications & Ini Files

Posted on 1998-07-06
6
177 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 71
Using "ScreenUpdating" 6 55
vb6 connector to SQL Server 2 34
Prevent user closing word document opened with VB6 6 67
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…
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 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 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…

895 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

12 Experts available now in Live!

Get 1:1 Help Now