Solved

Installing apps:  Best place for system files

Posted on 1999-01-08
5
151 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
[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
5 Comments
 
LVL 1

Accepted Solution

by:
bear454 earned 50 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

628 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