Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Installing apps:  Best place for system files

Posted on 1999-01-08
5
Medium Priority
?
152 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 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
Suggested Courses

661 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