Error when installing toolbar

2984
9
Jump to solution
02-08-2012 12:37 PM
BruceNielsen
Occasional Contributor III
I'm working on a small toolbar for ArcGIS 9.2, Windows XP, using Visual Studio .NET 2005. I followed Esri's instructions for creating an installer: http://edndoc.esri.com/arcobjects/9.2/NET/0df20605-b457-42d6-b63c-341a3824474a.htm. I can install the resulting .msi or .exe file on the workstation where the toolbar was developed, without being an admin. When I or our admin. tried to install it on other computers in the office, the install failed with an error code 2869. A web search ('install error 2869') returned mostly vague, unhelpful, and irrelevant results.

Has anyone else experienced this error when creating an installer, and how did you resolve it?
0 Kudos
1 Solution

Accepted Solutions
NeilClemmons
Regular Contributor III
In .NET you should not use New to create instances of singleton objects.  Use the Activator class as explained here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Interacting_with_single...

View solution in original post

0 Kudos
9 Replies
HenryColgate
Occasional Contributor
I remember coming across this problem when I was back on 9.2 a few years ago.  Sorry to say I can't remember the fix so don't have an exact solution but it is a matter of tweaking the setup and/or installer.

My suggestion would be to ensure that the target machine has all of the same framework and ArcGIS service packs as the dev machine .NET version in particular.

You will almost definitely need the Admin permissions to install so keep using those but I wouldn't take the fact that installs on the dev box as 100% proof that the installer MSI/EXE is setup correctly but is 95% likely to be working.
0 Kudos
BruceNielsen
Occasional Contributor III
Looking under "Add or Remove Programs" on the development system and one I tried to install the toolbar on, the .NET 2.0 packages and patches were identical.
0 Kudos
sapnas
by
Occasional Contributor III
Windows installer normally logs error in event viewer. You may have to check the event viewer to get more details on this issue. Also I forgot to mention that the installers always work on development machine as the tool bar is already stored in the registry. To test the installer you have completely get rid of the toolbar.
0 Kudos
AlexanderGray
Occasional Contributor III
My experience with making msi installers is that almost always screwed up a step on my first try and then it was hopeless trying to find the error.  I would scrap the set up program and print out the instructions in that link you refer to and go through each step ticking them off.  9 times out of 10 that works for me.  Also make sure that all the libraries referenced are on the target machines.  Some libraries are only installed with the extensions.  Usually the error message warns in the install that you are missing libraries but perhaps not in this case.  Also make sure the .net framework was on the machine before installing arcgis or else you will be missing the arcgis .net interop.
0 Kudos
BruceNielsen
Occasional Contributor III
My experience with making msi installers is that almost always screwed up a step on my first try and then it was hopeless trying to find the error.  I would scrap the set up program and print out the instructions in that link you refer to and go through each step ticking them off.  9 times out of 10 that works for me.  Also make sure that all the libraries referenced are on the target machines.  Some libraries are only installed with the extensions.  Usually the error message warns in the install that you are missing libraries but perhaps not in this case.  Also make sure the .net framework was on the machine before installing arcgis or else you will be missing the arcgis .net interop.


The tools I created don't access any extensions, so I don't think that is an issue. Our systems are centrally managed, and the initial setup is done from a standard image. Is there a way I can verify that .NET & ArcGIS were installed in the right order?

I followed agray1's advice and created a new installer. One person's advice for dealing with install issues was to create a log file of the install with the command: msiexec /i "installer.msi" /lvx "log.txt". In the log file, the explanation of error 2869 is "The dialog ErrorDialog has the error style bit set, but is not an error dialog". My code does not contain an ErrorDialog.
0 Kudos
sapnas
by
Occasional Contributor III
Did you find any error in windows event viewer? Also verify if the esri .net assemblies are installed in C:\WINDOWS\assembly location.
0 Kudos
AlexanderGray
Occasional Contributor III
For 9.2, if you check in the install folder for a folder called "dotnet"  the interops should be in there.  Extension need not be used to be necessary, if you add a reference to them in the project, they are needed to deploy even if they are not used.  Also make sure the user running the installer has administrative privileges and has access to the registry.  You need full access to the registry to use an installer.  Based on the error, it looks like something is tripping up the installer, the installer is trying to report the problem and failing, this failure to report the problem is causing the error.
0 Kudos
BruceNielsen
Occasional Contributor III
Upon further investigation, I discovered that my development computer had ArcGIS 9.2 SP6 installed, whereas the target computers would only be at SP5. This is due to a dependency with other custom software that isn't installed on the development computer. I've moved Visual Studio 2005 & my project to a computer configured the same as the target computers.

This has introduced a new issue. Before the move, the tool I'm developing was working correctly. After the move, I rebuilt the project successfully, but now when testing the program fails at the line
Dim pWF as IWorkspaceFactory = New ShapefileWorkspaceFactory
If I break that line down into two statements, it fails at
pWF = New ShapefileWorkspaceFactory
The error I'm getting in the Output Window is
A first chance exception of type "System.InvalidCastException" occurred in HEL_Tool.dll


Does anyone know how to resolve this error?
0 Kudos
NeilClemmons
Regular Contributor III
In .NET you should not use New to create instances of singleton objects.  Use the Activator class as explained here:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Interacting_with_single...
0 Kudos