[GIS] How to create installer for ArcObjects applications in VS 2012

arcobjectsdeploymentinstallationvisual studio

After Visual studio 2010, the extremely useful "Setup And Deployment" project have been removed from visual studio. And MS have packed it with a rather lousy InstallShield LE(LIMITED edition).

You can see the frustrated user voices here

enter image description here

Visual studio 2012 and ArcMap 10.3.1 are what I have now. So what are the options now to build an installer for my ArcObjects Tools other than playing around with hacking the limited options in InstallShield LE. Are there any documents in the ESRI Developer docs? I have not found anything yet.

What I'm specifically interested is the process of registration and unregistration of Dlls after installation and unistallation.

All suggestions are welcome.

Best Answer

I had your problem before. I will share a productive solution to solve your problem with InstallShield Limited Edition.

  1. Create a console application project in visual studio and let's call it "InvokeESRIRegAsm". This command line application will have to funcations: install, unistall. Install will take path of your dll and use ESRIRegAsm.exe to register that Dll. And the reverse is true for Unistall.

Now build the project. you will end up with InvokeESRIRegAsm.exe that takes 2 parameters. 1st parameter is to determine whether to install(register) or unistall the dll. 2nd parameter is the location of the dll to register.

  1. Create an InstallShield Project in VS 2012 (let's call it ISLE_Setup). Add InvokeESRIRegAsm.exe to the files that will get installed with your setup. Then go to "Custom Actions" section of InstallShield project. Create a new EXE under "After Register Product" node (Check the following snapshot)

enter image description here

Create the same entry for unistallation process under "After System Changes" node to unregister your dlls after unistallation.

Related Question