Solved

Installing apps:  Best place for system files

Posted on 1999-01-08
5
150 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Advice in Xamarin 21 121
Problem to line 23 80
all the possible sequences for numbers 1,2,3,4,5,6,7,8,9,10 in groups of 5. 5 66
can this macro be converted to sub procedure 4 34
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…

738 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