InstallAppEx Method
Topic Last Modified: 2006-06-13
Installs an application from a CAB file or a folder.
Applies To
Type Library
Microsoft CDO for Exchange 2000 Library
DLL Implemented In
CDOEX.DLL
Syntax
Sub InstallAppEx( ByVal bstrDstFolderURL As String,
ByVal bstrSrcFileFullPath As String,
ByVal bstrUserName As String,
ByVal bstrPassword As String,
ByVal lFileOption As Long,
ByVal lOverwriteOption As Long,
ByVal hInstall As Long,
ByVal lTotalTicks As Long)
HRESULT InstallAppEx
(
BSTR bstrDstFolderURL,
BSTR bstrSrcFileFullPath,
BSTR bstrUserName,
BSTR bstrPassword,
long lFileOption,
long lOverwriteOption,
long hInstall,
long lTotalTicks
);
Parameters
- bstrDstFolderURL
The URL to the destination Exchange store folder where the application is to be installed. The folder and any of its parent folders that do not exist will be created.
- bstrSrcFileFullPath
The absolute path in the Microsoft® Windows® file system of the packaged application. This can either be the path and filename for a CAB file, or the path to a folder of a packaged application.
- bstrUserName
The username required for authentication.
- bstrPassword
The password required for authentication.
- lFileOption
Specify 0 to install from a CAB file or 1 from a folder.
- lOverwriteOption
Controls overwrite options if a CAB file or folder exists. Specify 0 to prompt a confirmation, 1 to fail, or 2 to overwrite without a confirmation.
- hInstall
Reserved. Specify 0 (zero).
- lTotalTicks
Reserved. Specify 0 (zero).
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
This method is an extension of the older InstallApp method that provided installation from a CAB file and not from a folder.
Examples
The following example is in Microsoft Visual Basic®.
Dim obj As New ExAppInstaller
obj.InstallAppEx bstrTargetURL, _
bstrCabFile, _
bstrName, bstrPassword, _
1, 2, 0, 0
The following example is in Microsoft Visual C++®.
IExAppInstallerPtr spObject;
hr = spObject.CreateInstance(__uuidof(ExAppInstaller));
if (FAILED(hr)) {
// error handling code...
}
hr = spObject->InstallAppEx(
bstrFolderURL,
bstrPackageName,
bstrUserName,
bstrPassword,
1,2,0,0
);
if (FAILED(hr) ) {
// error handling code...
}