Jump to content

Windows Server 2008 COMAdminCatalog


Recommended Posts

Posted

We are testing our application using Windows Server 2008 and we are

facing a problem while trying to register our COM+ dlls using

COMAdminCatalog.

 

We use a vbs script that takes care of all COM+ configuration

automatically for us, helping the installation process. But this

script does not work properly on Windows 2008.

 

The script runs without any error messages and checking the Component

Services Management Console, the component appears there registered,

but it doesn't start running.

 

If we do a manual installation on Component Services MMC everything

goes OK.

 

Checking the registry differences using the Manual Installation and

the COMAdminCatalog script we discovered that the Manual installation

creates 5 entries on Windows Registry while the COMAdminCatalog just

creates 2 entries.

 

Manual Installation:

- HKCR\CLSID\{guid}

- HKCR\TypeLib\{guid}

- HKLM\Software\Classes\CLSID\{guid}

- HKLM\Software\Classes\TypeLib\{guid}

- HKLM\Software\Microsoft\COM3\SelfReg\CLSID\{guid}

 

COMAdminCatalog

- HKCR\TypeLib\{guid}

- HKLM\Software\Classes\TypeLib\{guid}

 

There goes a part of the vbs script:

Sub InstallApplication(ApplName, ApplDesc, UserName, Password,

DLLPath, DLLName)

 

Dim fulldllpath

 

 

 

Dim cat

 

Set cat = CreateObject("COMAdmin.COMAdminCatalog")

 

 

 

If not ApplicationExists(ApplName) Then

 

Dim apps

 

Set apps = cat.GetCollection("Applications")

 

Dim app

 

Set app = apps.Add

 

app.Value("Name") = ApplName

 

app.Value("Description") = ApplDesc

 

app.Value("ApplicationAccessChecksEnabled") = False

 

app.Value("AccessChecksLevel") = 1

 

app.Value("Activation") = "Local"

 

If UserName <> "" Then

 

app.Value("Identity") = UserName

 

app.Value("Password") = Password

 

End If

 

apps.SaveChanges

 

End if

 

 

 

fulldllpath = DLLPath & "\" & DllName

 

Trace "Installing " & fulldllpath & "..."

 

cat.InstallComponent ApplName, fulldllpath, "", ""

 

 

 

Trace "Done."

 

Set cat = Nothing

 

End Sub

 

 

Thanks a lot,

 

Zed Martins

TEKNISA

  • 3 weeks later...
  • Replies 2
  • Created
  • Last Reply
Guest Sean McGinnis
Posted

Re: Windows Server 2008 COMAdminCatalog

 

Zed, this looks very similar to what I am doing. The only difference I

can see is after creating the application I call

CreateServiceForApplication. I also create a new Role and RoleUser for

the application.

 

Zed wrote:

> We are testing our application using Windows Server 2008 and we are

> facing a problem while trying to register our COM+ dlls using

> COMAdminCatalog.

>

> We use a vbs script that takes care of all COM+ configuration

> automatically for us, helping the installation process. But this

> script does not work properly on Windows 2008.

>

> The script runs without any error messages and checking the Component

> Services Management Console, the component appears there registered,

> but it doesn't start running.

>

> If we do a manual installation on Component Services MMC everything

> goes OK.

>

> Checking the registry differences using the Manual Installation and

> the COMAdminCatalog script we discovered that the Manual installation

> creates 5 entries on Windows Registry while the COMAdminCatalog just

> creates 2 entries.

>

> Manual Installation:

> - HKCR\CLSID\{guid}

> - HKCR\TypeLib\{guid}

> - HKLM\Software\Classes\CLSID\{guid}

> - HKLM\Software\Classes\TypeLib\{guid}

> - HKLM\Software\Microsoft\COM3\SelfReg\CLSID\{guid}

>

> COMAdminCatalog

> - HKCR\TypeLib\{guid}

> - HKLM\Software\Classes\TypeLib\{guid}

>

> There goes a part of the vbs script:

> Sub InstallApplication(ApplName, ApplDesc, UserName, Password,

> DLLPath, DLLName)

>

> Dim fulldllpath

>

>

>

> Dim cat

>

> Set cat = CreateObject("COMAdmin.COMAdminCatalog")

>

>

>

> If not ApplicationExists(ApplName) Then

>

> Dim apps

>

> Set apps = cat.GetCollection("Applications")

>

> Dim app

>

> Set app = apps.Add

>

> app.Value("Name") = ApplName

>

> app.Value("Description") = ApplDesc

>

> app.Value("ApplicationAccessChecksEnabled") = False

>

> app.Value("AccessChecksLevel") = 1

>

> app.Value("Activation") = "Local"

>

> If UserName <> "" Then

>

> app.Value("Identity") = UserName

>

> app.Value("Password") = Password

>

> End If

>

> apps.SaveChanges

>

> End if

>

>

>

> fulldllpath = DLLPath & "\" & DllName

>

> Trace "Installing " & fulldllpath & "..."

>

> cat.InstallComponent ApplName, fulldllpath, "", ""

>

>

>

> Trace "Done."

>

> Set cat = Nothing

>

> End Sub

>

>

> Thanks a lot,

>

> Zed Martins

> TEKNISA

Posted

Re: Windows Server 2008 COMAdminCatalog

 

Thanks Sean, I will try this...

 

Zed


×
×
  • Create New...