Delete Add-In when installing another Add-In

863
6
Jump to solution
09-15-2022 05:27 AM
TomGeo
by
Occasional Contributor III

I would like to know if I can use DAML to

  • check if a specific Add-In exists in AGP
  • if it does exist, if there is the possibility to delete it

I wrote an Add-In that is replacing two earlier Add-Ins I wrote and I would like to delete the two earlier Add-Ins on a customers AGP if they are installed.

Is that possible during the installation process of the new Add-In?

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You can use this method to iterate through all add-ins and find your old add-ins, then use FullPath to delete the add-in (will disappear after ArcGIS Pro restarts):  GetAddInInfos Method—ArcGIS Pro

Needless to say, this only works if the user has permissions to delete the add-in.

You can also look at this sample code which deletes add-ins: Esri/arcgis-pro-sdk-community-samples: ArcGIS Pro SDK for Microsoft .NET Framework Community Samples...

View solution in original post

6 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

If you know old add-ins GUID's you can remove their folders from This PC > Documents > ArcGIS > AddIns > ArcGISPro folder.

  <AddInInfo id="{997969c2-c517-4481-af7e-dbdb0e20399c}" version="1.0" desktopVersion="2.0.0">
    <Name>Custom Pop-up Tool</Name>
    <Description>Show a custom pop-up.</Description>
    <Image>Images\AddinDesktop32.png</Image>
    <Author>ArcGIS Pro SDK Team, arcgisprosdk@esri.com</Author>
    <Company>esri, http://www.esri.com</Company>
    <Date>9/28/2015</Date>
    <Subject>Map-Exploration</Subject>
  </AddInInfo>

 

GintautasKmieliauskas_0-1663246578177.png

 

 

 

0 Kudos
TomGeo
by
Occasional Contributor III

I know the GUIDs. However, that does not sound like this is something I can build into to installation routine of the new Add-In.

I am looking for some functionality similar to dependencies of one Add-In to another Add-In, or using the DAML to remove buttons in the UI... just to delete a whole Add-In.

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos
GKmieliauskas
Esri Regular Contributor

You can build simple bat file with OS commands or code executable using c#.

Another way is to use configuration instead of add-in. It could remove add-in commands/tools from ArcGIS Pro UI. Check configuration samples on Esri Community samples git.

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You can use this method to iterate through all add-ins and find your old add-ins, then use FullPath to delete the add-in (will disappear after ArcGIS Pro restarts):  GetAddInInfos Method—ArcGIS Pro

Needless to say, this only works if the user has permissions to delete the add-in.

You can also look at this sample code which deletes add-ins: Esri/arcgis-pro-sdk-community-samples: ArcGIS Pro SDK for Microsoft .NET Framework Community Samples...

TomGeo
by
Occasional Contributor III

Thank you Wolf, that's a clean solution.

- We are living in the 21st century.
GIS moved on and nobody needs a format consisting out of at least three files! No, nobody needs shapefiles, not even for the sake of an exchange format. Folks, use GeoPackage to exchange data with other GIS!
0 Kudos
BillSmith
New Contributor III

Wishful thinking.  As ancient and limited as shapefiles are, they will never go away. ❤️