InstallAppFromURL Method
Topic Last Modified: 2006-06-13
Installs an application from a Web URL either inside or outside the Exchange store. This method only installs CAB files.
Applies To
Type Library
Microsoft CDO for Exchange 2000 Library
DLL Implemented In
CDOEX.DLL
Syntax
Sub InstallAppFromURL( ByVal bstrSrcURL As String,
ByVal bstrSrcUserName As String,
ByVal bstrSrcPassword As String,
ByVal bstrDstFolderURL As String,
ByVal bstrDstUserName As String,
ByVal bstrDstPassword As String,
ByVal lFileOption As Long,
ByVal lOverwriteOption As Long,
ByVal hInstall As Long,
ByVal lTotalTicks As Long)
HRESULT InstallAppFromURL
(
BSTR bstrSrcURL,
BSTR bstrSrcUserName,
BSTR bstrSrcPassword,
BSTR bstrDstFolderURL,
BSTR bstrDstUserName,
BSTR bstrDstPassword,
long lFileOption,
long lOverwriteOption,
long hInstall,
long lTotalTicks
);
Parameters
- bstrSrcURL
The URL to the CAB file.
- bstrSrcUserName
The username required for authentication to the source URL.
- bstrSrcPassword
The password required for authentication to the source URL.
- 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.
- bstrDstUserName
The username required for authentication to the destination URL.
- bstrDstPassword
The password required for authentication to the destination URL.
- 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
Examples
The following example is in Microsoft® Visual Basic®.
Dim obj As New ExAppInstaller
obj.InstallAppFromURL bstrSrcURL, _
bstrSrcUserName, _
bstrSrcPassword, _
bstrDstFolderURL, _
bstrDstUserName, _
bstrDstPassword, _
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->InstallAppFromURL(
btrSrcUserName,
bstrSrcPassword,
bstrDstFolderURL,
bstrDstUserName,
bstrDstPassword,
1,2,0,0
);
if (FAILED(hr) ) {
// error handling code...
}