We help IT Professionals succeed at work.

Programming with COMAdmin library/ Must know Component Services


The below script creates a new Component Services application. I would like to add an account for which this application will run under rather than using the interactive user.

I know it is possible thru the interface, however, I can't not find out how to do it. Any help would be great.

Thanks - JS

'' Consts
Const AppName = "WB"
Const AppDesc = "WB"
Const AppID = "{5779B872-6E96-4ca7-8FC7-611D39D20821}"
Const ServerPath = "c:\inetpub\executables\"
Const COMAdminActivationLocal = 1

'' Vars
Dim cat          '' COMAdminCatalog
Dim apps     '' COMAdminCatalogCollection
Dim app          '' COMAdminCatalogObject

Set cat = WScript.CreateObject("COMAdmin.COMAdminCatalog")
Set apps = cat.GetCollection("Applications")
Set app = apps.Add

app.Value("ID") = AppID
app.Value("Name") = AppName
app.Value("Description") = AppDesc
app.Value("Activation") = COMAdminActivationLocal
Watch Question

Hi  jeremiahscott,

You need to add these values before saving the changes.

app.Value("Identity") = Name '(Valid win2K username, by
defalut it is a string "Interactive User")

app.Value("Password") = Password '(For the valid win2K account)

Sets the server process identity for the application. Specify a valid Windows 2000 user account or ?Interactive User? to have the application assume the identity of the current logged-on user. This is not enabled for library applications, which run in the client process. Note that the Password property below should be set at the same time as Identity, prior to using SaveChanges, as the password and identity will be validated prior to being saved. If the password and identity get out of sync the application cannot be launched until they are reset by an administrator.


thanks! where did you find this in msdn? i have looked all over.

I read it before looking for something else. Just found searching for the COMAdminCatalog, Applications collection.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.