<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Windows 7 &amp;amp; IToolBar/ICommand Deployment Issues? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88130#M2315</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The class that implements IToolbarDef needs to have the component category registration code included in its code module.&amp;nbsp; Make sure that code is registering with the MxCommandBars category.&amp;nbsp; We use VS2010 so we aren't able to use the ESRI addins that come with the 9.3.1 SDK.&amp;nbsp; We have to copy the component registration code from existing classes and I've accidentally copied it from a command class before instead of a toolbar class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2011 12:50:17 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2011-08-01T12:50:17Z</dc:date>
    <item>
      <title>Windows 7 &amp;amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88123#M2308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone run into deployment issues with a custom IToolBar/Command Class and a regular old Setup Project that builds an .msi on a Windows7 Pro (32bit I think) machine????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a user that for some reason cannot load the extension/toolbar (it's not really an extension exactly).&amp;nbsp; But after running the .msi (no error), then choosing "Add From File" to load the .tlb, it still does not show up in the Commands list (so as to place a check to turn the toolbar on).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This same .msi runs and the toolbar shows up just fine on all other installs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any input.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 20:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88123#M2308</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-07-19T20:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88124#M2309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bumping TTT hoping for some feedback this a.m.!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 12:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88124#M2309</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-07-20T12:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88125#M2310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does the user have admin privileges on the machine?&amp;nbsp; If not, Add from File won't work for them because it requires entries to be created in the system registry.&amp;nbsp; Also, you can have your installer do this during install (it will also need admin rights).&amp;nbsp; There's really no need to require the user to do anything other than run your installer then open ArcMap and turn on your toolbar.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 13:44:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88125#M2310</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-07-20T13:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88126#M2311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Does the user have admin privileges on the machine?&amp;nbsp; If not, Add from File won't work for them because it requires entries to be created in the system registry.&amp;nbsp; Also, you can have your installer do this during install (it will also need admin rights).&amp;nbsp; There's really no need to require the user to do anything other than run your installer then open ArcMap and turn on your toolbar.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Neil, thanks for the feedback...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Quite possibly that would be the issue because the InstallerClass (which contains the registration process code) doesn't seem to work.&amp;nbsp; True, the person installing the .msi will log in as Admin then run the .msi --- but unsure if that same person is doing the "Add From File" (not likely as per your comments).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are right, the InstallerClass should be doing the registering!&amp;nbsp; Just not sure if the code I have is working as expected.&amp;nbsp; Here is the current code I am using in the InstallerClass to attempt to register the application on install/running the .msi:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.Install(stateSaver)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Register the custom component.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-----------------------------

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'The default location of the ESRIRegAsm utility.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Note how the whole string is embedded in quotes because of the spaces in the path.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cmd1 As String = """" + Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles) + "\ArcGIS\bin\ESRIRegAsm.exe" + """"

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim part1 As String = Me.Context.Parameters.Item("arg1")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Add the appropriate command line switches when invoking the ESRIRegAsm utility.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'In this case: /p:Desktop = means the ArcGIS Desktop product, /s = means a silent install.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim part2 As String = " /p:Desktop /s"

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'It is important to embed the part1 in quotes in case there are any spaces in the path.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cmd2 As String = """" + part1 + """" + part2 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Call the routing that will execute the ESRIRegAsm utility.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim exitCode As Integer = ExecuteCommand(cmd1, cmd2, 10000)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

Public Shared Function ExecuteCommand(ByVal Command1 As String, ByVal Command2 As String, ByVal Timeout As Integer) As Integer

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Set up a ProcessStartInfo using your path to the executable (Command1) and the command line arguments (Command2).
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ProcessInfo As ProcessStartInfo = New ProcessStartInfo(Command1, Command2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.CreateNoWindow = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.UseShellExecute = False

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Invoke the process.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim Process As Process = Process.Start(ProcessInfo)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process.WaitForExit(Timeout)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Finish.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ExitCode As Integer = Process.ExitCode
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process.Close()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return ExitCode
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88126#M2311</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T23:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88127#M2312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is code to register an addin.&amp;nbsp; The code for registering COM components is different.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Imports System.IO
Imports System.Security.AccessControl


Public Class Installer1

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'This call is required by the Component Designer.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Add initialization code after the call to InitializeComponent

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRegSvr As New RegistrationServices

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.Install(stateSaver)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not pRegSvr.RegisterAssembly(MyBase.GetType().Assembly, AssemblyRegistrationFlags.SetCodeBase) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Throw New InstallException("COM registration failed.&amp;nbsp; Some or all of the application classes are not properly registered in the ESRI component categories.")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.Message, "Install Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRegSvr As New RegistrationServices

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.Uninstall(savedState)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not pRegSvr.UnregisterAssembly(MyBase.GetType().Assembly) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Throw New InstallException("COM unregistration failed.&amp;nbsp; Some or all of the application classes were not properly removed from the ESRI component categories.")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.Message, "Uninstall Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

End Class&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88127#M2312</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2021-12-10T23:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88128#M2313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That is code to register an addin.&amp;nbsp; The code for registering COM components is different.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well hellsbells....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a bunch!&amp;nbsp; I'll re-work the Installer class with the suggested code you provided.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 14:06:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88128#M2313</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-07-20T14:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88129#M2314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neil,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for the code.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem --- after adding the corrected code below, the client reports that the toolbar/extension did not show up in the list (by right-clicking the menu area) after running the .msi package (logged in as admin). They attempted to load the .tlb with "Add From File" again, which resulted in the same behavior --- it added the objects, but do not show up in the list to be able to "put a check" into the box to turn on the toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Additonally, the .msi ran without any issues/hiccups and the installation folder is good!&amp;nbsp; So, there are no problems with the install.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That is code to register an addin.&amp;nbsp; The code for registering COM components is different.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.Runtime.InteropServices
Imports System.Windows.Forms
Imports System.IO
Imports System.Security.AccessControl


Public Class Installer1

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'This call is required by the Component Designer.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Add initialization code after the call to InitializeComponent

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRegSvr As New RegistrationServices

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.Install(stateSaver)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not pRegSvr.RegisterAssembly(MyBase.GetType().Assembly, AssemblyRegistrationFlags.SetCodeBase) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Throw New InstallException("COM registration failed.&amp;nbsp; Some or all of the application classes are not properly registered in the ESRI component categories.")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.Message, "Install Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Overrides Sub Uninstall(ByVal savedState As System.Collections.IDictionary)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRegSvr As New RegistrationServices

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.Uninstall(savedState)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not pRegSvr.UnregisterAssembly(MyBase.GetType().Assembly) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Throw New InstallException("COM unregistration failed.&amp;nbsp; Some or all of the application classes were not properly removed from the ESRI component categories.")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show(ex.Message, "Uninstall Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

End Class&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88129#M2314</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T23:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88130#M2315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The class that implements IToolbarDef needs to have the component category registration code included in its code module.&amp;nbsp; Make sure that code is registering with the MxCommandBars category.&amp;nbsp; We use VS2010 so we aren't able to use the ESRI addins that come with the 9.3.1 SDK.&amp;nbsp; We have to copy the component registration code from existing classes and I've accidentally copied it from a command class before instead of a toolbar class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 12:50:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88130#M2315</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-08-01T12:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88131#M2316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The class that implements IToolbarDef needs to have the component category registration code included in its code module.&amp;nbsp; &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you mean to include the Sub Install/Uninstall in the IToolbarDef class?&amp;nbsp; In other words, just copy over those 2 subs into the IToolbarDef class?&amp;nbsp; How do they get initiated from within that class (Sub New)?&amp;nbsp; Just a little confused on this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Make sure that code is registering with the MxCommandBars category. &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just running the Categories.exe would show the list, right?&amp;nbsp; Or is this no longer available with ArcGIS 10 install?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 13:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88131#M2316</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-08-01T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88132#M2317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, the component category registration code is the code that actually registers the class with the component categories.&amp;nbsp; ESRI has a VS addin that will generate this code for you if you have the SDK installed and are using a supported version of VS.&amp;nbsp; Since we develop for 9.3.1 using VS2010 (which is unsupported at 9.3.1) we don't use that addin and instead copy the code from existing classes that were created back when we could use that addin.&amp;nbsp; It is important to make sure this code is registering the class in the correct category.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, you can use categories.exe to see what classes have been registered.&amp;nbsp; If your toolbar class is showing up under the Mx CommandBars category, then it is properly registered.&amp;nbsp; If it is showing up under Mx Commands (or another category) then it is registered in the wrong category.&amp;nbsp; If you can't find it at all, then it's not registered.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 14:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88132#M2317</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-08-01T14:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88133#M2318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;No, the component category registration code is the code that actually registers the class with the component categories.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I must have an issue with my ICommand class (probably with the Category/Name properties, really don't know at this point).&amp;nbsp; In any event....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting a little desperate to get this installed on the client.&amp;nbsp; Can anyone explain why I can manually register the .tlb (via Customize--&amp;gt;Add From File) without any problem EXCEPT on a Windows7 32-bit computer (using admin priv's account at login)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: the ArcObjects SDK does not appear to be installed correctly as I cannot see any of the ArcGIS project templates or have the ArcGIS Component Category Registrar.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 12:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88133#M2318</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-08-03T12:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88134#M2319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your development environment is 32 bit and are deploying on 64 bit machine then build your application with the compiler option set to x86 in visual studio solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI components have to be compiled as x86, even though they are being deployed on 64 bit machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sumit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 14:56:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88134#M2319</guid>
      <dc:creator>SumitSharma</dc:creator>
      <dc:date>2011-08-03T14:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88135#M2320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello James,&lt;BR /&gt;&lt;BR /&gt;If your development environment is 32 bit and are deploying on 64 bit machine then build your application with the compiler option set to x86 in visual studio solution.&lt;BR /&gt;&lt;BR /&gt;ESRI components have to be compiled as x86, even though they are being deployed on 64 bit machine.&lt;BR /&gt;&lt;BR /&gt;Sumit&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sumit,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply/input.&amp;nbsp; The problem is that the client computer is 32-bit running W7 (I am told) and I am unsure what the dev machine is right now.&amp;nbsp; What if the dev computer is 64-bit?&amp;nbsp; What option should it be set to then?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;james&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2011 21:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88135#M2320</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-08-03T21:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88136#M2321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had to do a similar thing for an editor component this morning and found it didn't work either so i spent the last couple of hours working out whats going on. Fortunately its an 'easy' fix.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Presumably you're using the procedure from: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_deploy_a_custom_component_using_a_setup_project/00010000016r000000/"&gt;How to deploy a custom component using a setup project.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your deploying to a windows 7 machine then User Account Control (UAC) is probably turned on by default. This means that ESRIRegAsm.exe needs to run as administrator to actually do anything useful. Being part of the administrators group in windows 7 isnt good enough, the exe will need to run with elevated privileges (I usually set the program compatibility to run as administrator when manually working with dll's).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To do this in your setup, add the following lines in the installer class (in the InvokeESRIRegAsm project) to read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.UseShellExecute = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.Verb = "runas"; //aka run as administrator&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the ExecuteCommand procedure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll also have to change the custom action scripts in the Setup project itself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try entering /arg1="[TARGETDIR]\???.dll" for the install and uninstall custom action scripts. (replace ??? with your dll name of course).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This works for me anyway. I'll have a chat to the SDK team about the doc...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 00:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88136#M2321</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-08-04T00:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88137#M2322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your detailed reply, Sean.&amp;nbsp; I'll take another stab creating a new setup project (yes that's the link I was following originally) and try the settings you specify.&amp;nbsp; Will keep you posted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again --- thanks for your effort and help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;James,&lt;BR /&gt;&lt;BR /&gt;I had to do a similar thing for an editor component this morning and found it didn't work either so i spent the last couple of hours working out whats going on. Fortunately its an 'easy' fix.&lt;BR /&gt;Presumably you're using the procedure from: &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_deploy_a_custom_component_using_a_setup_project/00010000016r000000/"&gt;How to deploy a custom component using a setup project.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If your deploying to a windows 7 machine then User Account Control (UAC) is probably turned on by default. This means that ESRIRegAsm.exe needs to run as administrator to actually do anything useful. Being part of the administrators group in windows 7 isnt good enough, the exe will need to run with elevated privileges (I usually set the program compatibility to run as administrator when manually working with dll's).&lt;BR /&gt;&lt;BR /&gt;To do this in your setup, add the following lines in the installer class (in the InvokeESRIRegAsm project) to read:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.UseShellExecute = false;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProcessInfo.Verb = "runas"; //aka run as administrator&lt;BR /&gt;in the ExecuteCommand procedure.&lt;BR /&gt;&lt;BR /&gt;You'll also have to change the custom action scripts in the Setup project itself.&lt;BR /&gt;Try entering /arg1="[TARGETDIR]\???.dll" for the install and uninstall custom action scripts. (replace ??? with your dll name of course).&lt;BR /&gt;&lt;BR /&gt;This works for me anyway. I'll have a chat to the SDK team about the doc...&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 12:10:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88137#M2322</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2011-08-04T12:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88138#M2323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still not having any success with this.&amp;nbsp; So, I went back and tried to get this to work on a WinXP platform and I still cannot get the COM component to register (however, I can load the ICommand/IToolbar Class by way of Customize--&amp;gt;Add From File--&amp;gt;.tlb on the XP workstation).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, here is everything I have.&amp;nbsp; If there is anything blaringly incorrect, please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;clsFire.vb&lt;/STRONG&gt;&lt;SPAN&gt; is the ICommand and IToolbar class.&amp;nbsp; The app utilizesa UserControl (you'll see that I pass the app ref to it in the OnCreate):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;ComClass(clsFire.ClassId, clsFire.InterfaceId, clsFire.EventsId), ProgId("Fire_v3_1.clsFire")&amp;gt; _
Public Class clsFire
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ProgId("Fire_v2_0.clsFire_v2")&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements ESRI.ArcGIS.SystemUI.ICommand
&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements ESRI.ArcGIS.SystemUI.IToolControl
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private m_pApp As IApplication
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private pDoc As IMxDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private pMap As IMap
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private pLayer As IFeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private sLayerName As String
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private m_completionNotify As ICompletionNotify

&amp;nbsp;&amp;nbsp;&amp;nbsp; Private m_FireUC As FireUC = New FireUC



#Region "COM GUIDs"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' These&amp;nbsp; GUIDs provide the COM identity for this class 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' and its COM interfaces. If you change them, existing 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' clients will no longer be able to access the class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const ClassId As String = "01cf11bf-9fac-45e6-892a-4fc0fe020753"
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const InterfaceId As String = "732b6107-f31b-4078-b257-a718f725500e"
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const EventsId As String = "03223c0d-bf75-4b00-9cb8-966ed1428b18"
#End Region

#Region "ArcGIS Component Category Registrar generated code"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category registration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxCommands.Register(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category unregistration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxCommands.Unregister(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

#End Region

&amp;nbsp;&amp;nbsp;&amp;nbsp; ' A creatable COM class must have a Public Sub New() 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' with no parameters, otherwise, the class will not be 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' registered in the COM registry and cannot be created 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' via CreateObject.
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New()
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Bitmap() As Integer Implements ESRI.ArcGIS.SystemUI.ICommand.Bitmap
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Caption() As String Implements ESRI.ArcGIS.SystemUI.ICommand.Caption
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "Fire_V3.1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Category() As String Implements ESRI.ArcGIS.SystemUI.ICommand.Category
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "Fire_V3.1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Checked() As Boolean Implements ESRI.ArcGIS.SystemUI.ICommand.Checked
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Enabled() As Boolean Implements ESRI.ArcGIS.SystemUI.ICommand.Enabled
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property HelpContextID() As Integer Implements ESRI.ArcGIS.SystemUI.ICommand.HelpContextID
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property HelpFile() As String Implements ESRI.ArcGIS.SystemUI.ICommand.HelpFile
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return ""
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Message() As String Implements ESRI.ArcGIS.SystemUI.ICommand.Message
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return ""
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Name() As String Implements ESRI.ArcGIS.SystemUI.ICommand.Name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "Fire_V3.1" '"clsFire"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub OnCreate(ByVal hook As Object) Implements ESRI.ArcGIS.SystemUI.ICommand.OnCreate
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.Application.EnableVisualStyles()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not (hook Is Nothing) Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf (hook) Is IMxApplication Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_pApp = CType(hook, IApplication)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC.m_pApp = m_pApp
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Nothing Is m_FireUC Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC = New FireUC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC.CreateControl()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Catch ex As Exception
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox(ex.ToString)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Try
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub OnClick() Implements ESRI.ArcGIS.SystemUI.ICommand.OnClick

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Tooltip() As String Implements ESRI.ArcGIS.SystemUI.ICommand.Tooltip
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "clsFire"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property hWnd() As Integer Implements ESRI.ArcGIS.SystemUI.IToolControl.hWnd
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Nothing Is m_FireUC Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC = New FireUC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC.CreateControl()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hWnd = m_FireUC.Handle.ToInt32

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Function OnDrop(ByVal barType As ESRI.ArcGIS.SystemUI.esriCmdBarType) As Boolean Implements ESRI.ArcGIS.SystemUI.IToolControl.OnDrop
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OnDrop = True
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub OnFocus(ByVal complete As ESRI.ArcGIS.SystemUI.ICompletionNotify) Implements ESRI.ArcGIS.SystemUI.IToolControl.OnFocus
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_FireUC.CompletionNotify = complete
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
End Class&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I have followed the steps exactly as outlined here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_deploy_a_custom_component_using_a_setup_project/00010000016r000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_deploy_a_custom_component_using_a_setup_project/00010000016r000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The InvokeESRIRegAsm project and Installer class are EXACTLY as described in the walkthru.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Setup Project itself has been created EXACTLY as outlined in the walkthru.&amp;nbsp; Additionally, I have tried a multitude of various settings for the Install/Uninstall of the CustomActionData settings -- all of which produce the same behavior:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The install runs without error, the directories are created and the referenced .dll's all copied over.&amp;nbsp; But the registration does not work.&amp;nbsp; I am not sure if there is something incorrect in the ICommand Name/Category/Caption properties of clsFire (which is why I have posted), but again the Toolbar does not show up in the Toolbars or Commands listings.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I CAN register the files manually by way of Customize--&amp;gt;Add from file, but this is only on XP machines.&amp;nbsp; This does not work on W7 machines, which is why I believe there is something else going wrong in my Setup or InvokeESRIRegAsm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any more help is greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88138#M2323</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T23:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88139#M2324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Couldn't add the IToobarDef class code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;ComClass(FireToolBarDef.ClassId, FireToolBarDef.InterfaceId, FireToolBarDef.EventsId)&amp;gt; _
Public Class FireToolBarDef
&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements IToolBarDef

#Region "ArcGIS Component Category Registrar generated code"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category registration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxCommands.Register(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category unregistration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MxCommands.Unregister(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

#End Region
#End Region
#Region "COM GUIDs"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' These&amp;nbsp; GUIDs provide the COM identity for this class 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' and its COM interfaces. If you change them, existing 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' clients will no longer be able to access the class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const ClassId As String = "3a781dce-3d88-40be-9351-e0f5d7cdfabf"
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const InterfaceId As String = "44fdf1a2-255e-4e36-8c09-e59c2d67182a"
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Const EventsId As String = "a0b77313-5f65-4a41-9d90-779112341e6c"
#End Region

&amp;nbsp;&amp;nbsp;&amp;nbsp; ' A creatable COM class must have a Public Sub New() 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' with no parameters, otherwise, the class will not be 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' registered in the COM registry and cannot be created 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ' via CreateObject.
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub New()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyBase.New()
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Caption() As String Implements ESRI.ArcGIS.SystemUI.IToolBarDef.Caption
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "Fire_V3.1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub GetItemInfo(ByVal pos As Integer, ByVal itemDef As ESRI.ArcGIS.SystemUI.IItemDef) Implements ESRI.ArcGIS.SystemUI.IToolBarDef.GetItemInfo
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case pos
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemDef.ID = "Fire_v3_1.clsFire"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemDef.Group = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property ItemCount() As Integer Implements ESRI.ArcGIS.SystemUI.IToolBarDef.ItemCount
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Name() As String Implements ESRI.ArcGIS.SystemUI.IToolBarDef.Name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Get
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return "Fire_V3.1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Get
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Property
End Class&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88139#M2324</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T23:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88140#M2325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The component category registration code in your toolbar class is registering the toolbar in MxCommands.&amp;nbsp; It should be registering it in MxCommandBars.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2011 18:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88140#M2325</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-08-15T18:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88141#M2326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The component category registration code in your toolbar class is registering the toolbar in MxCommands.&amp;nbsp; It should be registering it in MxCommandBars.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had really hoped it was (and still hope it is) something like this.&amp;nbsp; Unfortunately, it still did not register either the Toolbar or Command.&amp;nbsp; Here are the changes I made to the ToolbarDef class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Region "ArcGIS Component Category Registrar generated code"
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category registration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryRegistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MxCommandBars&lt;/STRONG&gt;.Register(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Required method for ArcGIS Component Category unregistration -
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Do not modify the contents of this method with the code editor.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Private Shared Sub ArcGISCategoryUnregistration(ByVal registerType As Type)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim regKey As String = String.Format("HKEY_CLASSES_ROOT\CLSID\{{{0}}}", registerType.GUID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;MxCommandBars&lt;/STRONG&gt;.Unregister(regKey)

&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

#End Region&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88141#M2326</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-10T23:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Windows 7 &amp; IToolBar/ICommand Deployment Issues?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88142#M2327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see that I incorrectly told you that your original installer class code was for registering an addin.&amp;nbsp; That's not true, that is the code you need for your installer to kick off the component category registration for ArcGIS 10.&amp;nbsp; The code I posted in that reply is for ArcGIS 9.3.1 and earlier.&amp;nbsp; So, if you're deploying for 10 your original installer class code should work now that you corrected the registration code in your toolbar class.&amp;nbsp; If you're deploying for 9.3.1 or earlier then I'm not sure what the problem might be.&amp;nbsp; I think someone mentioned that the installer needs elevated permissions in order to run correctly.&amp;nbsp; You can do this by right-clicking the setup.exe and choosing Run as Admin.&amp;nbsp; I'm not at my work computer right now so I can't look at our installers to see what else we may be doing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2011 19:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/windows-7-amp-amp-itoolbar-icommand-deployment/m-p/88142#M2327</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2011-08-15T19:25:46Z</dc:date>
    </item>
  </channel>
</rss>

