Take a look at the ICOMAdminCatalog::ExportApplication API ( and
possibly ICOMAdminCatalog::InstallApplication if you want the restore
process automated too).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cossdk/htm/icomadmincatalog_70ha.asp
Sample script:
'*******************
'* backup.vbs
'*******************
dim Catalog
set Catalog = CreateObject("COMAdmin.COMAdminCatalog")
' export the application(s)
catalog.ExportApplication(appName_1, msiFile_1, 5)
....
....
catalog.ExportApplication(appName_N, msiFile_N, 5)
set Catalog = nothing
'******************************************************************
Of course you can enhance the script to shut down/pause the COM+
application before the export, handle errors, use other export
options, etc. To restore, just run the generated MSI files manually,
or write a similar script using the InstallApplication() API. The
generated MSI is self-comtained in a sense of having the application
components as a part of the file.
It is possible to write a loop enumerating all COM+ applications, but
that would include the pre-defined system applications, etc, which you
do not want to back up. I think you would be better off explicitly
listing the COM+ applications to be backed up.
Regards,
Slava Gurevich
On 11 Dec 2003 13:19:31 -0800, svercuski@neo.rr.com (Scott Vercuski)
[quoted text, click to view] wrote:
>Hello everyone,
>
> I have a question regarding COM+ Component Services. I currently
>have a machine that has a number of separate COM+ Packages with 1-2
>components in each package. We're implementing a new backup strategy
>and I would like to know if there is a way to script the
>creation/registration of packages and components in the event that I
>have to rebuild the server. For instance, under COM+ I have the
>following setup
>
>Console Root
> Component Services
> Computers
> My Computer
> COM+ Applications
> Pkg1
> Components
> Component1
> Pkg2
> Components
> Component2
>
>All of the com components are stored in separate folders under
>c:\components
>
>c:\components\Component1\Component1.dll
>c:\components\Component2\Component2.dll
>
>Is there a way to have a script that will automatically generate Pkg1
>and Pkg2 (with the appropriate username/password) and register the
>components under their respective packages all in one fell swoop? I'm
>thinking of this in the disaster recovery scenario where I have to get
>the machine back up and running as fast as possible and re-registering
>and creating over 100 packages will take some time. If I could just
>restore the components from a backup tape to their directories and
>then run this script to re-register everything it would be an enormous
>timesaver. Has anyone done anything like this? and if so could you
>please let me know if it worked and how you went about it.
>
>Thank you in advance for any help,
>
>Scott Vercuski
>svercuski@neo.rr.com