Video Screencast Help

Implementing .DLL Isolation with an .EXE using Wise Package Studio

Created: 06 Dec 2007 • Updated: 06 Dec 2007 | 5 comments
Language Translations
R-Vijay's picture
0 0 Votes
Login to vote

If your application works only with certain version of a DLL -- but your computer has the same DLL with higher version -- here's a possible work around.

Introduction:

DLL Isolation is used when an application needs a specific version of a shared DLL for it to work. What it does is to copy the DLL into the same folder as the EXE that needs it. The fact is that one can only have one version of the DLL loaded in memory at a time. (ie: Application A loads DLL version 1 and then Application B tries to load DLL version 2 but can't. Application B ends up hanging or blowing up...

In this case, one of the components can be placed in the same directory as the application, and a file created with the same name as the application executable, with an extension .LOCAL. Then the local component will be used by preference by this application (other applications will use the non-local component, or their own local components).

Because the same registry entries are used for both copies of the component, the components need to be binary compatible for this to work. Hence these registry components are given a shared count under properties.

Steps to follow to isolate a .dll using WPS:

  1. On the Components tab in Setup Editor, right-click the .DLL you want to isolate.
  2. From the right-click menu, select New > Isolated Component. The Isolated Component Details dialog appears where you pick a file for isolation from the feature that contains the component.
    • If the key path for the current component is not an .EXE, then the drop-down list shows all .EXEs in the containing feature that are key paths of .DLL files.
    • If the key path for the current component is an .EXE, then the drop-down list shows all files from the containing feature that are key paths other than the current component.
  3. From the Associated File drop-down list, select the .EXE you want to assign to this .DLL.
  4. Click OK.

This technique can be used when more than one version of a component needs to exist on a workstation and the two components are binary compatible.

Comments 5 CommentsJump to latest comment

jdulle's picture

Or you can use the Application Isolation wizard

0
Login to vote
R-Vijay's picture

Hi buddy..

thats true, the conflict manager wizard solves all these steps in a easy manner. However, I just wanted to show an insight on how exactly one should choose a localised dll.

One can also look at the below article to understand the Application Isolation basics and directions.

http://juice.altiris.com/node/2609

Cheers'
Viju

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote
vijayksuvarna's picture

Conflict Manager won't support isolation. Let me clear the things here.......

Conflict Manager: It's a interface which shows the conflict between the COM objects.
We have to take necessary steps to resolve these conflicts.

Isolation: Its a method to avoid conflicts. What we do here is isolate the COM objects that might conflict with others into the application folder. So conflicts will be avoided.

There are several ways to do the isolation,
One is as mentioned by "jdulle" which is the basic and easy method of doing the isolation in Wise Package Studio.
Other is as mentioned by "Viju" which is using the component tab.

I will add one more: You can use the "Isolated Component" table directly to do it quick.

Some Tips:
1. Never Isolate a "shared exe" to the non shared COM object. Because it's waste.
2. Never go for Isolation if you have a huge number of shared COM Objects, it will effect the size of the instalation as well as the time for the installation.
3. Dont check the option to install the isolated files to "Shared Location". Because it will contradict to the usage of the isolation.

Hope it will be helpful.

Vijay Kumar
~~~~Problem is something which is having a solution~~~~

Vijay Kumar
~~~~Problem is something which is having a solution~~~~

0
Login to vote
R-Vijay's picture

Well, It was just a mistake that I used the word Conflict manager there. I was referring on Application Isolation and so did I refer to one of my previous article too.

It's nice to figure out some different ways to obtain isolation in this discussion..

I reckon, these tips Vijay Kumar suggested will be really useful for all who keep their first steps towards Isolation.

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote
R-Vijay's picture

You can create isolated components so that a destination computer's existing files will not be overwritten with your application's installed files. If an existing file is overwritten with a file that you are installing, there may be problems with an application that existed on the computer before the install.

When a file has been included in an isolated component, the file will be installed into the application's installation directory rather than a Windows system directory

Microsoft MVP [Setup-Deploy]
Weblog: www.msigeek.com

0
Login to vote