Create Connection Folder in ArcCatalog through ArcMap VB.NET

Discussion created by kpt982 on Jul 27, 2011
Latest reply on Nov 28, 2011 by agray1
I am trying to create a connection folder in ArcCatalog through an extension on start up using the following code.

Dim gCatalog As IGxCatalog = New GxCatalogClass
gCatalog.ConnectFolder(Environ("USERPROFILE") & "\My Documents\ArcGIS\")

The code creates the folder connection in the ArcCatalog Window within ArcMap.  However, the folder connection is not seen by dialogs such as AddData, Output Data, or even the ArcCatalog Application itself.  I need the folder to be recognized in these areas.

I think I need to reference the ArcCatalog application in some way.  But not sure how to reference it via an ArcMap extension .dll.

I have come across this file path to reference the User Specific ArcCatalog settings.  But still not sure how to incorporate this into the code.

C:\Documents and Settings\>>yourUserProfile<<\Application Data\ESRI\ArcCatalog\ArcCatalog.gx