Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Installing apps:  Best place for system files

Posted on 1999-01-08
5
Medium Priority
?
154 Views
Last Modified: 2010-05-03
Hey all,

I haven't done much Windows programming and want to know y'all's thoughts on where to install system files that support a VB application.  In the past, I installed them in the application directory so I wouldn't overwrite existing versions in the system directory and perhaps become the source of error for other applications.  However, at times this led to problems when a user would launch my app with the Windows system version of a dll already in memory that was not compatible with the one I needed.  This, of course, also made it look like the app wasn't working right.

So...do y'all recommend that I install system files to the app directory or Windows\system?

Thanks for your thoughts in advance.
0
Comment
Question by:iw
5 Comments
 
LVL 1

Accepted Solution

by:
bear454 earned 100 total points
ID: 1454951
Windows\System, with version checking. Most setup programs will help you handle this.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 1454952
Bear is probably right, if done correctly this is the best place for them, as it keeps your users from installing multiple copies of the same dll's in every application directory.  

I don't know how much flexibility your install program will allow, but it is ideal if it is smart enough to update an older version of a dll with a newer one - while saving the old version in a backup directory.   Because, while your newly installed app will run fine, you may have just blown some other app out of the water.  

Alternatively, you could install only the conflicting DLL's in the application directory, and let the user know if they have a problem running the app to (unfortunately) exit windows and re-enter, then run your app.  

There is also another alternative to explore and that is a product called DLLagator.  I forget the company name, but they produce a product that will allow two copies of a DLL with the same name, different versions to be loaded into memory at the same time.  They also give you the ability to unload a DLL from memory without exiting Windows.  Their tool is also just great to have to monitor which applications load which DLLs and which versions.  It's a good tool for any developer to have if they are having DLL conflicts, though it may be hard to set it up to run transparently on your clients.

MD
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1454953
The setup wizard that comes with VB does a good job of keeping things straight. It won't overwrite newer versions of .DLL files and puts the app .EXE off in \Program Files\appname. Other files that you include will also be placed here.

The generated SETUP.LST file has pointers telling it where to install. Is easy to modify if you don't like defaults.

M

0
 
LVL 3

Expert Comment

by:traygreen
ID: 1454954
Better yet - You can put the DLL's in windows\system < or system32>\<appname> folder
0
 

Author Comment

by:iw
ID: 1454955
Thanks for the comments everyone.  Yes, I thought the best place is the system or system32 directory, but as most of you have said, I should make sure that I don't install over a more recent version of a dll.  I've run into the risk of doing this in the past when I have installed a new version but another app needs the older version of the dll (dll's are not always backward compatible!), and have gotten around it by then installing my newer version in my app directory instead of the systems directory!

I appreciate everyone's comments!  I guess the short answer is that there is no best place to install system files, but that the system directory will likely cause the least number of problems.

Thanks again,

iw
0

Featured Post

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!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
Suggested Courses

972 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