Apply the current package on the local system.
Syntax
object.Apply [directory] [, undofile]
The Apply method syntax has the following parts:
| Part |
Description |
| object |
An object expression that evaluates to a
Package object. |
| directory |
A string which specifies the installation
directory on the current system. This parameter is optional, and the default installation
directory will be used if it is not specified or if it is specified as an empty string. |
| undofile |
A string which specifies the name of the file
which contains the data and instructions to reverse the update process, restoring the
original files. This parameter is optional, and no undo file will be created if it is not
specified. |
Remarks
The FileName property must be set prior to
calling this method, specifying the name of the package that is to be applied. If the
package was created with a password, the Password property must be set to
the correct value.
Example
'
' Apply the specified patch file, ignoring any missing files and
' create an undo file so that the patch may be reversed; note
' that the installation directory is specified as an empty string,
' which causes the package to be applied in the default installation
' directory specified when the package was created
'
On Error Resume Next: Err.Clear
Package1.FileName = strPackageFile
Package1.Options = apIgnoreMissing
Package1.Apply "", strUndoFile
If Err.Number Then
MsgBox Err.Description
Exit Sub
End If
See Also
FileName Property,
Password Property, Progress
Event, Undo Method
|