Exports the specified deployable objects and their dependent objects from a Microsoft® Content Management Server 2002 (MCMS) system into a Site Deployment Object (SDO) file. Deployable objects are specified implicitly based on how recently they have changed and, potentially, according to their location in the channel hierarchy.
ReportURL = CmsDeployExport.Export(PackageFilename, TimeInterval, ParentChannel)
Parameters
- PackageFilename
-
A String that contains the fully qualified path and file name into which the objects will be exported.
- TimeInterval
-
A Long integer containing a time period specifying a number of minutes. Valid values are:
0: If the object has changed since the last time it was deployed (whether using the Site Manager or using the site deployment API), it will be exported.
1 or greater: If the object has changed in this number of minutes, it will be exported.
- ParentChannel
-
A String containing the globally unique identifier (GUID) of the parent channel. This can be a particular channel and its sub-channels or the entire Web site.
The GUID can be obtained using the Publishing API.
If this value is not supplied, the entire Web site will be incrementally exported. If a valid channel is supplied, only that channel and its sub-channel hierarchy will be incrementally exported.
A String that contains the URL of the output report. The report specifies a list of MCMS 2002 export objects contained in the package.
Changes to deployable objects must be approved in order to be included in an export operation. This includes channels and postings, as well as any objects on which they depend.
Objects upon which changed and approved channels and postings depend need not have changed themselves in order to be included in the export operation.
If the TimeInterval parameter has a value of zero (0), the export will include all objects that have changed and been approved since the last deployment was performed and the objects upon which they depend. If the site has never been deployed, and you specify zero (0) for the TimeInterval parameter, the entire site will be deployed.
The created SDO file will have its access controls list (ACL) set such that it will only be accessible to users with sufficient administrative privileges, such as running the script that called this method.
This method cannot be called successfully until an authentication method has been called successfully.
' Microsoft Visual Basic Scripting Edition (VBScript)
' source code for an export routine.
Sub Export
Dim pCmsDeployExport
Dim shell
Dim pExportOptions
On Error Resume Next
Set pCmsDeployExport = _
CreateObject("CmsDeployServer.CmsDeployExport.1")
If ( Err.Number <> 0 ) Then
Call MsgBox(Err.Description, vbCritical, "Export Problem")
Set pCmsDeployExport = Nothing
Exit Sub
End If
' Server side call to authenticate as current user.
pCmsDeployExport.AuthenticateAsCurrentUser
If ( Err.Number <> 0 ) Then
Call MsgBox(Err.Description, vbCritical, "Export Problem")
Set pCmsDeployExport = Nothing
Exit Sub
End If
Set pExportOptions = pCmsDeployExport.Options
If ( Err.Number <> 0 ) Then
Call MsgBox(Err.Description, vbCritical, "Export Problem")
Set pCmsDeployExport = Nothing
Set pExportOptions = Nothing
Exit Sub
End If
' Include Rights groups and their members.
pExportOptions.IncludeRightsGroups = 3
pExportOptions.IncludeCreatedBy = 2
Dim strPackageFileName
Dim strReportUrl
Set shell = WScript.CreateObject("WScript.Shell")
' Specify where you want the export package to be placed.
strPackageFileName = "C:\myexportedobjects.sdo"
' Perform the export.
strReportUrl = pCmsDeployExport.Export(strPackageFileName, 200, "")
If ( Err.Number <> 0 ) Then
Call MsgBox(Err.Description, vbCritical, "Export Problem")
Set shell = Nothing
Set pCmsDeployExport = Nothing
Set pExportOptions = Nothing
Exit Sub
End If
' Display the report in the Web browser.
shell.Run "http://localhost" & strReportUrl, 7
WScript.Echo "Export complete."
End Sub
Reference
Server-Side CmsDeployExport.AuthenticateAsUser Method
Server-Side CmsDeployExport.AuthenticateAsCurrentUser Method
Server-Side CmsDeployExport.AuthenticateUsingUserHandle Method
Server-Side CmsDeployExport.Options Property
Concepts
Server-Side CmsDeployExport Object
CmsDeployExportOptions Object