Windows 7 CSDK install not installing .net provide
Posted in 2014
User installing Informix CSDK 4.10 on Windows 7 found IBM.Data.Informix.dll not being installed to the GAC. Root cause identified: installing both 32-bit and 64-bit CSDK versions side-by-side is unsupported; DLL conflicts occur. A second responder noted the GAC registration tools require Windows SDK (installed with Visual Studio).
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades
This is a bit off-topic of what is usually on this list, but I'm having a problem installing the CSDK on windows 7. Specifically, I'm installing 4.10.TC4DE and 4.10.FC4DE side-by-side. My problem is that the IBM.Data.Informix.dll file doesn't make it into the GAC (neither x85 or x64). I know this has worked with older versions of the CSDK - is there some kind of pre-requisite for the installer? Thanks, -Justin
Hi Justin, On Windows 64 bit system we may install either CSDK 32bit or CSDK 64bit= product Co-existence of CSDK 32bit and 64bit product are not allowed. The DLLs distributed with CSDK product are of same name for both 32bit = and 64bit. Co-existence of CSDK product with different bit architecture will lead = into incompatible DLL gets loaded into application process space. Multiple version of CSDK with same bit architecture installed on a syst= em should mostly OK. Regards, Satyan Advisory Software Engineer R&D - IBM Information Management Division 11200 Lakeview, Lenexa, KS 66219 Tel: 913 599 8792 (T/L: 337-8792) From: "Justin Killen" <jkillen@allamericanasphalt.com> To: ids@iiug.org Date: 11/19/2014 10:33 AM Subject: Windows 7 CSDK install not installing .net pro.... [34187] Sent by: ids-bounces@iiug.org This is a bit off-topic of what is usually on this list, but I'm having= a problem installing the CSDK on windows 7. Specifically, I'm installing 4.10.TC4DE and 4.10.FC4DE side-by-side. My problem is that the IBM.Data.Informix.dll file doesn't make it into the GAC (neither x85 or= x64). I know this has worked with older versions of the CSDK - is there some = kind of pre-requisite for the installer? Thanks, -Justin ***********************************************************************= ******** Forum Note: Use "Reply" to post a response in the discussion forum. =
Justin, I had the same issue with the SDK, I opened a PMR (26762,227,000) and they opened an APAR (APAR IC82991) but the long and the short of it is that the tools to register the assembly in the GAC are not installed unless you have the Windows SDK installed on the box. This occurs when you install Visual Studio so a development box adds the assembly to the GAC (The old 'it worked on my development machine' issue). The solution for us was to create a separate tool that could add and remove items from the GAC. Here is the VB code to make it happen: Imports System Imports System.EnterpriseServices Imports System.EnterpriseServices.Internal Imports System.IO Imports System.Security Module RegAssm #Region "Constants" Public Const INSTALL_GAC As String = "-i" Public Const PATH As String = "-p" Public Const REGISTER_COM As String = "-reg" Public Const UNINSTALL_GAC As String = "-u" Public Const UNREGISTER_COM As String = "-unreg" #End Region #Region "Public" Public Function InstallToGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacInstall(P_path) P_outcome = String.Format("Installed {0} to the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 2 End Try Return exitCode End Function Public Sub Main(ByVal args As String()) Dim outcome As String Dim exitcode As Integer exitcode = 0 If (args.Length = 0) Then outcome = Usage() exitcode = 1 End If outcome = Process(args, exitcode) Console.WriteLine(outcome) Environment.Exit(exitcode) End Sub Private Function Process(ByVal P_args As String(), ByRef P_exitcode As Integer) As String Dim outcome As String Dim index As Integer Dim request As Task Dim assemblPath As String assemblPath = String.Empty outcome = String.Empty index = 0 While index < P_args.Length Select Case P_args(index) Case INSTALL_GAC request = Task.InstallGac Case PATH index += 1 assemblPath = P_args(index) Case REGISTER_COM request = Task.RegisterCom Case UNINSTALL_GAC request = Task.UninstallGac Case UNREGISTER_COM request = Task.UnRegisterCom End Select index += 1 End While If (Not String.IsNullOrWhiteSpace(assemblPath)) Then Select Case request Case Task.InstallGac P_exitcode = InstallToGAC(assemblPath, outcome) Case Task.RegisterCom P_exitcode = RegisterCom(assemblPath, outcome) Case Task.UninstallGac P_exitcode = UninstallFromGAC(assemblPath, outcome) Case Task.UnRegisterCom P_exitcode = UnregisterCom(assemblPath, outcome) End Select Else outcome = Usage() P_exitcode = 1 End If Return outcome End Function Public Function RegisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.RegisterAssembly(P_path) P_outcome = String.Format("Registered {0} for COM", P_path) exitCode = 0 Catch ex As RegistrationException P_outcome = ex.Message exitCode = 9 Catch ex As SecurityException P_outcome = ex.Message exitCode = 10 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 11 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 12 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 13 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 14 Catch ex As InvalidOperationException P_outcome = ex.Message exitCode = 15 End Try Return exitCode End Function Public Function UninstallFromGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacRemove(P_path) P_outcome = String.Format("Uninstalled {0} from the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 3 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 4 Catch ex As ArgumentException P_outcome = ex.Message exitCode = 5 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 6 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 7 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 8 End Try Return exitCode End Function Public Function UnregisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.UnRegisterAssembly(P_path) P_outcome = String.Format("Unregistered {0} from COM", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 16 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 17 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 18 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 19 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 20 Catch ex As InvalidOperationException P_outcome = ex.Message exitCode = 21 End Try Return exitCode End Function Public Function Usage() As String Dim msg As System.Text.StringBuilder msg = New System.Text.StringBuilder() msg.Append("RegAssm: Usage") msg.AppendLine() msg.AppendLine() msg.AppendFormat("RegAssm {0} {1} <Path To Assembly>", INSTALL_GAC, PATH) msg.AppendLine() msg.AppendFormat("RegAssm {0} {1} <Path To Assembly>", REGISTER_COM, PATH) msg.AppendLine() msg.Ap
Ben, Thanks for that - glad to know I'm not the only person having this problem. I'll take a look at the code and see about integrating it into our install process. On the x86/x64 issue - what problems do you have when they are both installed? We also force binaries into x86 mode, primarily because of the lack of Informix 64 bit drivers installed on user PCs (some are 64 bit, but most are not). I was hoping to start installing both x86 and x64 drivers on the 64 bit clients, so that we could migrate toward the Any CPU build target. I've installed both 4.10.TC4 and 4.10.FC4 on my dev station and I don't seem to have any problems, although admittedly the set of apps I use regularly is pretty limited. Are there specific issues that you have run into with having both drivers installed? -Justin -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Waters, Benjamin Sent: Wednesday, November 19, 2014 10:23 AM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34189] Justin, I had the same issue with the SDK, I opened a PMR (26762,227,000) and they opened an APAR (APAR IC82991) but the long and the short of it is that the tools to register the assembly in the GAC are not installed unless you have the Windows SDK installed on the box. This occurs when you install Visual Studio so a development box adds the assembly to the GAC (The old 'it worked on my development machine' issue). The solution for us was to create a separate tool that could add and remove items from the GAC. Here is the VB code to make it happen: Imports System Imports System.EnterpriseServices Imports System.EnterpriseServices.Internal Imports System.IO Imports System.Security Module RegAssm #Region "Constants" Public Const INSTALL_GAC As String = "-i" Public Const PATH As String = "-p" Public Const REGISTER_COM As String = "-reg" Public Const UNINSTALL_GAC As String = "-u" Public Const UNREGISTER_COM As String = "-unreg" #End Region #Region "Public" Public Function InstallToGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacInstall(P_path) P_outcome = String.Format("Installed {0} to the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 2 End Try Return exitCode End Function Public Sub Main(ByVal args As String()) Dim outcome As String Dim exitcode As Integer exitcode = 0 If (args.Length = 0) Then outcome = Usage() exitcode = 1 End If outcome = Process(args, exitcode) Console.WriteLine(outcome) Environment.Exit(exitcode) End Sub Private Function Process(ByVal P_args As String(), ByRef P_exitcode As Integer) As String Dim outcome As String Dim index As Integer Dim request As Task Dim assemblPath As String assemblPath = String.Empty outcome = String.Empty index = 0 While index < P_args.Length Select Case P_args(index) Case INSTALL_GAC request = Task.InstallGac Case PATH index += 1 assemblPath = P_args(index) Case REGISTER_COM request = Task.RegisterCom Case UNINSTALL_GAC request = Task.UninstallGac Case UNREGISTER_COM request = Task.UnRegisterCom End Select index += 1 End While If (Not String.IsNullOrWhiteSpace(assemblPath)) Then Select Case request Case Task.InstallGac P_exitcode = InstallToGAC(assemblPath, outcome) Case Task.RegisterCom P_exitcode = RegisterCom(assemblPath, outcome) Case Task.UninstallGac P_exitcode = UninstallFromGAC(assemblPath, outcome) Case Task.UnRegisterCom P_exitcode = UnregisterCom(assemblPath, outcome) End Select Else outcome = Usage() P_exitcode = 1 End If Return outcome End Function Public Function RegisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.RegisterAssembly(P_path) P_outcome = String.Format("Registered {0} for COM", P_path) exitCode = 0 Catch ex As RegistrationException P_outcome = ex.Message exitCode = 9 Catch ex As SecurityException P_outcome = ex.Message exitCode = 10 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 11 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 12 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 13 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 14 Catch ex As InvalidOperationException P_outcome = ex.Message exitCode = 15 End Try Return exitCode End Function Public Function UninstallFromGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacRemove(P_path) P_outcome = String.Format("Uninstalled {0} from the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 3 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 4 Catch ex As ArgumentException P_outcome = ex.Message exitCode = 5 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 6 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 7 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 8 End Try Return exitCode End Function Public Function UnregisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.UnRegisterAssembly(P_path) P_outcome = String.Format("Unregistered {0} from COM", P_path) exitCode = 0 Catch ex As Security
Satyan from IBM has already sent in a reply about the main concerns with the comingling of CSDKs, when I did it on non-development machines I was unable to connect. Troubleshooting the issue showed me what Satyan stated, that the DLL's have the same name and therefore the system was unable to determine what DLL to load so it did not do it. I did not have the issue on my Dev Machine either, something about having the Windows SDK / Visual Studio must have resolved the name clash (maybe better entries in the PATH variable who knows). Since our application cannot go to 64 bit I did not push the issue but if it is an issue for you I would talk to IBM either through a PMR or through the enhancement request process. Another possible option is to use the DB2 driver connecting with DRDA. I played with it a few years ago and have a data conversion issue that stopped us from using it (Booleans did not act the way I expected) so I dropped it due to lack of time to troubleshoot the issue. Thanks Ben Waters Systems Integrator Scottsdale City Court -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Justin Killen Sent: Wednesday, November 19, 2014 12:32 PM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34191] Ben, Thanks for that - glad to know I'm not the only person having this problem. I'll take a look at the code and see about integrating it into our install process. On the x86/x64 issue - what problems do you have when they are both installed? We also force binaries into x86 mode, primarily because of the lack of Informix 64 bit drivers installed on user PCs (some are 64 bit, but most are not). I was hoping to start installing both x86 and x64 drivers on the 64 bit clients, so that we could migrate toward the Any CPU build target. I've installed both 4.10.TC4 and 4.10.FC4 on my dev station and I don't seem to have any problems, although admittedly the set of apps I use regularly is pretty limited. Are there specific issues that you have run into with having both drivers installed? -Justin -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Waters, Benjamin Sent: Wednesday, November 19, 2014 10:23 AM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34189] Justin, I had the same issue with the SDK, I opened a PMR (26762,227,000) and they opened an APAR (APAR IC82991) but the long and the short of it is that the tools to register the assembly in the GAC are not installed unless you have the Windows SDK installed on the box. This occurs when you install Visual Studio so a development box adds the assembly to the GAC (The old 'it worked on my development machine' issue). The solution for us was to create a separate tool that could add and remove items from the GAC. Here is the VB code to make it happen: Imports System Imports System.EnterpriseServices Imports System.EnterpriseServices.Internal Imports System.IO Imports System.Security Module RegAssm #Region "Constants" Public Const INSTALL_GAC As String = "-i" Public Const PATH As String = "-p" Public Const REGISTER_COM As String = "-reg" Public Const UNINSTALL_GAC As String = "-u" Public Const UNREGISTER_COM As String = "-unreg" #End Region #Region "Public" Public Function InstallToGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacInstall(P_path) P_outcome = String.Format("Installed {0} to the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 2 End Try Return exitCode End Function Public Sub Main(ByVal args As String()) Dim outcome As String Dim exitcode As Integer exitcode = 0 If (args.Length = 0) Then outcome = Usage() exitcode = 1 End If outcome = Process(args, exitcode) Console.WriteLine(outcome) Environment.Exit(exitcode) End Sub Private Function Process(ByVal P_args As String(), ByRef P_exitcode As Integer) As String Dim outcome As String Dim index As Integer Dim request As Task Dim assemblPath As String assemblPath = String.Empty outcome = String.Empty index = 0 While index < P_args.Length Select Case P_args(index) Case INSTALL_GAC request = Task.InstallGac Case PATH index += 1 assemblPath = P_args(index) Case REGISTER_COM request = Task.RegisterCom Case UNINSTALL_GAC request = Task.UninstallGac Case UNREGISTER_COM request = Task.UnRegisterCom End Select index += 1 End While If (Not String.IsNullOrWhiteSpace(assemblPath)) Then Select Case request Case Task.InstallGac P_exitcode = InstallToGAC(assemblPath, outcome) Case Task.RegisterCom P_exitcode = RegisterCom(assemblPath, outcome) Case Task.UninstallGac P_exitcode = UninstallFromGAC(assemblPath, outcome) Case Task.UnRegisterCom P_exitcode = UnregisterCom(assemblPath, outcome) End Select Else outcome = Usage() P_exitcode = 1 End If Return outcome End Function Public Function RegisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.RegisterAssembly(P_path) P_outcome = String.Format("Registered {0} for COM", P_path) exitCode = 0 Catch ex As RegistrationException P_outcome = ex.Message exitCode = 9 Catch ex As SecurityException P_outcome = ex.Message exitCode = 10 Catch ex As ArgumentNullException P_outcome = ex.Message exitCode = 11 Catch ex As FileNotFoundException P_outcome = ex.Message exitCode = 12 Catch ex As BadImageFormatException P_outcome = ex.Message exitCode = 13 Catch ex As FileLoadException P_outcome = ex.Message exitCode = 14 Catch ex As InvalidOperationException P_outcome = ex.Message exitCode = 15 End Try Return exitCode End Function Public Function UninstallFromGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException(@@DQ
Ben, I know that earlier versions of the CSDK the installer prevented installation of both the 32 and 64 bit products. I was assuming that since the 4.10 installer allowed side-by-side installation that it was now a supported option - bad assumption on my end apparently. Being able to have both 32 and 64 bit drivers installed side-by-side was the primary drive to move to the 4.10 drivers, so with the .net provider GAC issue, I think for the immediate future we'll stick with the 3.70 install for users (I'll open a ticket with IBM when I get some free time). The DB2 driver is a good thought. We haven't played with that one much, but it might be worth looking into. Thanks for the insight, -Justin -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Waters, Benjamin Sent: Wednesday, November 19, 2014 12:05 PM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34195] Satyan from IBM has already sent in a reply about the main concerns with the comingling of CSDKs, when I did it on non-development machines I was unable to connect. Troubleshooting the issue showed me what Satyan stated, that the DLL's have the same name and therefore the system was unable to determine what DLL to load so it did not do it. I did not have the issue on my Dev Machine either, something about having the Windows SDK / Visual Studio must have resolved the name clash (maybe better entries in the PATH variable who knows). Since our application cannot go to 64 bit I did not push the issue but if it is an issue for you I would talk to IBM either through a PMR or through the enhancement request process. Another possible option is to use the DB2 driver connecting with DRDA. I played with it a few years ago and have a data conversion issue that stopped us from using it (Booleans did not act the way I expected) so I dropped it due to lack of time to troubleshoot the issue. Thanks Ben Waters Systems Integrator Scottsdale City Court -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Justin Killen Sent: Wednesday, November 19, 2014 12:32 PM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34191] Ben, Thanks for that - glad to know I'm not the only person having this problem. I'll take a look at the code and see about integrating it into our install process. On the x86/x64 issue - what problems do you have when they are both installed? We also force binaries into x86 mode, primarily because of the lack of Informix 64 bit drivers installed on user PCs (some are 64 bit, but most are not). I was hoping to start installing both x86 and x64 drivers on the 64 bit clients, so that we could migrate toward the Any CPU build target. I've installed both 4.10.TC4 and 4.10.FC4 on my dev station and I don't seem to have any problems, although admittedly the set of apps I use regularly is pretty limited. Are there specific issues that you have run into with having both drivers installed? -Justin -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of Waters, Benjamin Sent: Wednesday, November 19, 2014 10:23 AM To: ids@iiug.org Subject: RE: Windows 7 CSDK install not installing .net.... [34189] Justin, I had the same issue with the SDK, I opened a PMR (26762,227,000) and they opened an APAR (APAR IC82991) but the long and the short of it is that the tools to register the assembly in the GAC are not installed unless you have the Windows SDK installed on the box. This occurs when you install Visual Studio so a development box adds the assembly to the GAC (The old 'it worked on my development machine' issue). The solution for us was to create a separate tool that could add and remove items from the GAC. Here is the VB code to make it happen: Imports System Imports System.EnterpriseServices Imports System.EnterpriseServices.Internal Imports System.IO Imports System.Security Module RegAssm #Region "Constants" Public Const INSTALL_GAC As String = "-i" Public Const PATH As String = "-p" Public Const REGISTER_COM As String = "-reg" Public Const UNINSTALL_GAC As String = "-u" Public Const UNREGISTER_COM As String = "-unreg" #End Region #Region "Public" Public Function InstallToGAC(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.GacInstall(P_path) P_outcome = String.Format("Installed {0} to the GAC", P_path) exitCode = 0 Catch ex As SecurityException P_outcome = ex.Message exitCode = 2 End Try Return exitCode End Function Public Sub Main(ByVal args As String()) Dim outcome As String Dim exitcode As Integer exitcode = 0 If (args.Length = 0) Then outcome = Usage() exitcode = 1 End If outcome = Process(args, exitcode) Console.WriteLine(outcome) Environment.Exit(exitcode) End Sub Private Function Process(ByVal P_args As String(), ByRef P_exitcode As Integer) As String Dim outcome As String Dim index As Integer Dim request As Task Dim assemblPath As String assemblPath = String.Empty outcome = String.Empty index = 0 While index < P_args.Length Select Case P_args(index) Case INSTALL_GAC request = Task.InstallGac Case PATH index += 1 assemblPath = P_args(index) Case REGISTER_COM request = Task.RegisterCom Case UNINSTALL_GAC request = Task.UninstallGac Case UNREGISTER_COM request = Task.UnRegisterCom End Select index += 1 End While If (Not String.IsNullOrWhiteSpace(assemblPath)) Then Select Case request Case Task.InstallGac P_exitcode = InstallToGAC(assemblPath, outcome) Case Task.RegisterCom P_exitcode = RegisterCom(assemblPath, outcome) Case Task.UninstallGac P_exitcode = UninstallFromGAC(assemblPath, outcome) Case Task.UnRegisterCom P_exitcode = UnregisterCom(assemblPath, outcome) End Select Else outcome = Usage() P_exitcode = 1 End If Return outcome End Function Public Function RegisterCom(ByVal P_path As String, ByRef P_outcome As String) As Integer Dim pub As Publish Dim exitCode As Integer If (String.IsNullOrWhiteSpace(P_path)) Then Throw New ArgumentNullException("P_path") End If pub = New Publish Try pub.RegisterAssembly(P_path) P_outcome = String.Format("Registered {0} for COM", P_path) exitCode = 0@@N