28#include <systools/win32/uwinapi.h>
29#include "../tools/seterror.hxx"
31extern "C" __declspec(dllexport) UINT __stdcall CheckInstallDirectory(MSIHANDLE handle)
33 std::wstring sInstallPath =
GetMsiPropertyW(handle, L
"INSTALLLOCATION");
34 std::wstring sOfficeHostnamePath =
GetMsiPropertyW(handle, L
"OFFICEDIRHOSTNAME");
44 std::wstring sSetupIniPath = sInstallPath + sOfficeHostnamePath + L
"\\program\\setup.ini";
46 WIN32_FIND_DATAW data;
47 HANDLE hdl = FindFirstFileW(sSetupIniPath.c_str(), &data);
__declspec(dllexport) UINT __stdcall CheckInstallDirectory(MSIHANDLE handle)
static bool IsValidHandle(HANDLE handle)
void SetMsiErrorCode(int nErrorCode)
#define MSI_ERROR_DIRECTORY_NOT_EMPTY
static std::wstring GetMsiPropertyW(MSIHANDLE handle, const std::wstring &sProperty)
static void SetMsiPropertyW(MSIHANDLE handle, const std::wstring &sProperty, const std::wstring &sValue)
static void UnsetMsiPropertyW(MSIHANDLE handle, const std::wstring &sProperty)