View Full Version : COM+ apps change install location

11-17-2004, 02:36 PM
I want to change the install location for COM+ apps. Here are the steps I took:
Added the apps in the Component Services view.
Go to the Component view under Organization.
Highlight the component for the COM+ app (app name_Server) and click on the drop-down for the Destination.
Create a new directory entry, with the name for the COM+ app. Create it under the correct install folder location.
Go to Files and Folders view under Application Data. Expand ProgramFilesFolder and COMPlus Applications. Highlight the GUID folder, to show the DLLs.
Drag the DLLs from the Destination computer’s files pane into the newly created folder under the install directory.
Delete the GUID folder.

Installation results with DLLs installed in desired disk location, COM+ apps created good, but no components are installed in the apps and get error after states "removing backup files":
Error 27508.Error installing COM+ app xxx. The file does not exist: c:\WINDOWS\system32\zzz.dll (My install dir is not system32, by the way.)
I tried the same install without changing the install location, and it was successful. So, it is not liking something about giving a different install directory. Any ideas?

Thanks! Alison

01-28-2005, 12:32 PM
I phoned IS on this one. You cannot move the COM+ components using drag and drop in the File and Folders view, like I was. It messes up the IS project components. You have to go into the Setup Desing view, highlight the component and change the destination folder. This really sucks because you have to do it in each DLL and each class. If you update your DLLs, you have to refresh them and then set the destination again because it reverts back to the IS default location. I requested an "enhancement", asking that they leave destinations alone during refresh and also provide a way to set all classes in a COM+ app to have the same destination. Hope this helps someone!


02-02-2005, 09:49 AM
I also suggested this be added.
Hopefully enough people will suggest and it will be done soon.



02-04-2005, 07:31 AM
In DevStudio 9 the COM+ application only created one component, as opposed to one for each class in InstallShield 10.5. It was feasible to change the location when you only have to change it once! I'm very frustrated this has changed, as it is important for my setup to control where the DLLs are located.

Can anyone from InstallShield say when the enhancements suggested by Alsion might be available?


08-26-2005, 03:56 AM
Yes I am having this problem too. If I have to make a change to anything in my COM+ app I have to refresh... this sends the destinations back to default.. ahhh!

08-26-2005, 07:53 AM
I never found any way around this. I have resorted to copying the files in and manually calling regsvcs.exe to register the COM+ apps in my project.

08-26-2005, 09:04 AM
You can use the IS automation interface and VB or VBScript to set the destination location of all components in a feature. You must put each COM+ application into its own feature to use this. You set each feature destination once in your IS project, and when you refresh a COM app, you can then run the VB code to set all of the component/class destinations.

I wrote a little VB EXE that I just run from within the VB IDE, changing the variable for the IS project as needed. It greatly improved my deployment life.

Below is the code I use. I hope it improves your lives too!

' set the strFile variable for the Installshield project!!
Public Sub Main()

' replace ISWiAuto11 with ISWiAuto1050 for IS 10.5
Set ISWiProject = CreateObject("ISWiAuto11.ISWiProject")

Dim pComsFeature As ISWiFeature
Dim pFeature As ISWiFeature
Dim pComponent As ISWiComponent
Dim sDestination As String

strFile = "s:\InstallshieldProjects\vCOMs3_0_9\vCOMs3_0_9.ism"
ISWiProject.OpenProject strFile

Set pComsFeature = ISWiProject.ISWiFeatures.Item("COMs")
' loop each COM+ app, which resides in its own feature
For Each pFeature In pComsFeature.Features

' use next when com app goes in folder under installdir
sDestination = Mid(pFeature.Destination, InStr(1, pFeature.Destination, "[", vbTextCompare), 500)

' use next when com app goes to folder above installdir
'sDestination = Mid(pFeature.Destination, InStr(1, pFeature.Destination, "}", vbTextCompare) + 2, 500)

' loop each class and asign same install dir as feature is set to
For Each pComponent In pFeature.ISWiComponents
pComponent.Destination = sDestination

Call ISWiProject.SaveProject

End Sub