bool MSOfficeLPIAction::Download(ProgressStatus progress, void *data)
{
	bool bFile1, bFile2;
	ConfigurationFileActionDownload downloadVersion;

	assert(_getDownloadID() != NULL);
	
	downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), wstring(_getDownloadID()));	
	wcscpy_s(m_szFilename, downloadVersion.GetFilename().c_str());
	wcscpy_s(m_szFullFilename, m_szTempPath);
	wcscat_s(m_szFullFilename, m_szFilename);	
	bFile1 = m_downloadManager->GetFileAndVerifyAssociatedSha1(downloadVersion, m_szFullFilename, progress, data);

	if (_needsInstallConnector())
	{
		downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), wstring(L"OutlookHotmailConnector"));
		m_connectorFile = m_szTempPath;
		m_connectorFile += downloadVersion.GetFilename().c_str();		
		bFile2 = m_downloadManager->GetFileAndVerifyAssociatedSha1(downloadVersion, m_connectorFile, progress, data);
		return bFile1 == true && bFile2 == true;
	}
	else
	{
		return bFile1;
	}
}
void OutLookHotmailConnector::GetDownloadConfigurationAndTempFile(ConfigurationFileActionDownload& downloadVersion, wstring& tempFile)
{
	wchar_t szTempPath[MAX_PATH];

	GetTempPath(MAX_PATH, szTempPath);

	downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(MSOfficeLPIActionID, wstring(L"OutlookHotmailConnector"));
	tempFile = szTempPath;
	tempFile += downloadVersion.GetFilename().c_str();
	m_installerLocation = tempFile;
}
bool AdobeReaderAction::Download(ProgressStatus progress, void *data)
{	
	wstring filename;
	ConfigurationFileActionDownload downloadVersion;

	downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), ApplicationVersion(GetVersion()));
	GetTempPath(MAX_PATH, m_szFilename);
	wcscat_s(m_szFilename, downloadVersion.GetFilename().c_str());

	return m_downloadManager->GetFile(downloadVersion, m_szFilename, progress, data);
}
bool Windows8LPIAction::Download(ProgressStatus progress, void *data)
{
    wchar_t filename[MAX_PATH];
    ConfigurationFileActionDownload downloadVersion;

    downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), wstring(_getDownloadID()));
    GetTempPath(MAX_PATH, filename);
    wcscat_s(filename, downloadVersion.GetFilename().c_str());
    m_filename = filename;

    return m_downloadManager->GetFileAndVerifyAssociatedSha1(downloadVersion, filename, progress, data);
}
bool IELPIAction::Download(ProgressStatus progress, void *data)
{
	if (_createTempDirectory() == false)
		return false;	

	wstring filename;	
	ConfigurationFileActionDownload downloadVersion;

	downloadVersion = ConfigurationInstance::Get().GetRemote().GetDownloadForActionID(GetID(), _getDownloadID());
	GetTempPath(MAX_PATH, m_filename);
	wcscat_s(m_filename, downloadVersion.GetFilename().c_str());

	return m_downloadManager->GetFile(downloadVersion, m_filename, progress, data);
}