diff options
author | obo <obo@openoffice.org> | 2010-06-15 12:28:14 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-15 12:28:14 +0200 |
commit | 3f52b1af15f69f72b8acdc691fad366638b5933a (patch) | |
tree | aa1a26a0c9bcea2b3a22fc48a35b8964ede58f11 | |
parent | 7bce502de1cbb7b22e725b1a85b17aa431f75405 (diff) | |
parent | 1e7e9bea33a3f39b54a715be36a1a14ac680a333 (diff) |
CWS-TOOLING: integrate CWS native305
18 files changed, 54 insertions, 114 deletions
diff --git a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx index 86cba0908bbb..9a933eea0334 100755 --- a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx +++ b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx @@ -177,8 +177,8 @@ static BOOL MoveFileExImpl( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, D extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); WIN32_FIND_DATA aFindFileData; diff --git a/setup_native/source/win32/customactions/languagepacks/respintest.cxx b/setup_native/source/win32/customactions/languagepacks/respintest.cxx index bdfb97dfb3e1..6a98af8a3f30 100644 --- a/setup_native/source/win32/customactions/languagepacks/respintest.cxx +++ b/setup_native/source/win32/customactions/languagepacks/respintest.cxx @@ -88,7 +88,7 @@ namespace extern "C" UINT __stdcall GetUserInstallMode(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + string sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); // MessageBox(NULL, sOfficeInstallPath.c_str(), "DEBUG", MB_OK); diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx index d6f0933077fc..6285d64ebe3f 100755 --- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx +++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx @@ -544,8 +544,7 @@ static std::queue< std::_tstring > getProfileKeys( const std::_tstring& aFileNam extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle ) { std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); - std::_tstring sBasisInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\"); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt"); std::queue< std::_tstring > aSectionNames; @@ -605,16 +604,11 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) HKEY hKey; std::_tstring sInstDir; - std::_tstring sBasisInstDir; std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") ); if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sBasisInstDir = szValue; - } if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -623,10 +617,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sBasisInstDir = szValue; - } if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -636,7 +626,7 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) else return ERROR_SUCCESS; - std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\"); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt"); std::queue< std::_tstring > aSectionNames; @@ -689,8 +679,8 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle ) extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); WIN32_FIND_DATA aFindFileData; @@ -733,8 +723,8 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle ) // 1. Reading Product Code from setup.ini of installed Office - std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - // MessageBox(NULL, sInstallPath.c_str(), "BASISINSTALLLOCATION", MB_OK); + std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); + // MessageBox(NULL, sInstallPath.c_str(), "INSTALLLOCATION", MB_OK); std::_tstring sSetupiniPath = sInstallPath + TEXT("program\\setup.ini"); TCHAR szProductCode[32767]; @@ -869,8 +859,8 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle ) // Online Update functionality is always available. Then the dialog // that offers the Online Update is superfluous. - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); - std::_tstring sProgramDir = sInstDir + TEXT("program\\"); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); + std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\"); std::_tstring sSearchFile = sProgramDir + TEXT("updchk.uno.dll"); WIN32_FIND_DATA data; diff --git a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx index f732a3a8ad57..25659a0b4109 100644 --- a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx +++ b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx @@ -15,13 +15,13 @@ std::string GetOfficeInstallationPath(MSIHANDLE handle) DWORD sz = 0; LPTSTR dummy = TEXT(""); - if (MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA) + if (MsiGetProperty(handle, TEXT("INSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA) { sz++; // space for the final '\0' DWORD nbytes = sz * sizeof(TCHAR); LPTSTR buff = reinterpret_cast<LPTSTR>(_alloca(nbytes)); ZeroMemory(buff, nbytes); - MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), buff, &sz); + MsiGetProperty(handle, TEXT("INSTALLLOCATION"), buff, &sz); progpath = buff; } return progpath; diff --git a/setup_native/source/win32/customactions/rebase/rebase.cxx b/setup_native/source/win32/customactions/rebase/rebase.cxx index 4d031bee908a..dfe1e82e1e9b 100644 --- a/setup_native/source/win32/customactions/rebase/rebase.cxx +++ b/setup_native/source/win32/customactions/rebase/rebase.cxx @@ -126,13 +126,11 @@ static BOOL rebaseImagesInFolder( MSIHANDLE handle, const std::string& sPath, LP static BOOL rebaseImages( MSIHANDLE handle, LPVOID pAddress ) { - std::string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - std::string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - std::string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); + std::string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - std::string sBasisDir = sBasisInstallPath + TEXT("program\\"); - std::string sOfficeDir = sOfficeInstallPath + TEXT("program\\"); - std::string sUreDir = sUreInstallPath + TEXT("bin\\"); + std::string sBasisDir = sInstallPath + TEXT("Basis\\program\\"); + std::string sOfficeDir = sInstallPath + TEXT("program\\"); + std::string sUreDir = sInstallPath + TEXT("URE\\bin\\"); BOOL bResult = rebaseImagesInFolder( handle, sBasisDir, pAddress ); bResult &= rebaseImagesInFolder( handle, sOfficeDir, pAddress ); diff --git a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx index 8cfc1fb08597..2941ba5a8e27 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx @@ -52,7 +52,7 @@ bool IsAllUserInstallation(MSIHANDLE handle) std::wstring GetOfficeInstallationPath(MSIHANDLE handle) { std::wstring progpath; - GetMsiProp(handle, TEXT("OFFICEINSTALLLOCATION"), progpath); + GetMsiProp(handle, TEXT("INSTALLLOCATION"), progpath); return progpath; } diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx index 2264a228030d..53eb16a99583 100644..100755 --- a/setup_native/source/win32/customactions/reg64/reg64.cxx +++ b/setup_native/source/win32/customactions/reg64/reg64.cxx @@ -56,13 +56,14 @@ WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); // in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. // Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and // extensions\source\activex\main\so_activex.cpp + #ifndef KEY_WOW64_64KEY #define KEY_WOW64_64KEY (0x0100) #endif #define TABLE_NAME L"Reg64" -#define BASISINSTALLLOCATION L"[BASISINSTALLLOCATION]" +#define INSTALLLOCATION L"[INSTALLLOCATION]" bool isInstall4AllUsers; wchar_t * sBasisInstallLocation; @@ -214,9 +215,10 @@ wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI ) OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" ); bool bResult = FALSE; wchar_t* pVal = NULL; - GetMsiProp( hMSI, L"BASISINSTALLLOCATION", &pVal); + GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal); OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" ); + return pVal; } @@ -325,14 +327,14 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView) - wchar_t* nPos = wcsstr(szValue , BASISINSTALLLOCATION); + wchar_t* nPos = wcsstr(szValue , INSTALLLOCATION); if ( NULL != nPos) { DWORD nPrefixSize = nPos - szValue; DWORD nPropSize = wcslen(sBasisInstallLocation); - DWORD nPostfixSize = dwValue - wcslen( BASISINSTALLLOCATION ); + DWORD nPostfixSize = dwValue - wcslen( INSTALLLOCATION ); DWORD nNewValueBytes = (nPropSize + nPostfixSize + 1) * sizeof( wchar_t ); wchar_t* newValue = reinterpret_cast<wchar_t*>( malloc( nNewValueBytes ) ); @@ -345,7 +347,7 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView) wcsncat(newValue, sBasisInstallLocation, nPropSize * sizeof( wchar_t )); // postfix - wcsncat(newValue, nPos + ( wcslen( BASISINSTALLLOCATION ) ), nPropSize * sizeof( wchar_t )); + wcsncat(newValue, nPos + ( wcslen( INSTALLLOCATION ) ), nPropSize * sizeof( wchar_t )); wcsncpy(szValue, newValue, nNewValueBytes <=1024? nNewValueBytes: 1024); diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 1e91ccbd8599..037824689a47 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -170,7 +170,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue ) BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath ) { wchar_t* pProgPath = NULL; - if ( GetMsiProp( hMSI, L"OFFICEINSTALLLOCATION", &pProgPath ) && pProgPath ) + if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath ) { char* pCharProgPath = UnicodeToAnsiString( pProgPath ); #ifdef OWN_DEBUG_PRINT diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx index 09f60b7a66d5..9a028953fef1 100755 --- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx +++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx @@ -184,12 +184,12 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) // renaming the vcl resource doesn't work reliable with OS >= Windows Vista if (osverinfo.dwMajorVersion < 6 ) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") ); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); // Property empty -> no office installed if ( sInstDir.length() == 0 ) return ERROR_SUCCESS; - std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\"); + std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\"); std::_tstring sPattern = sResourceDir + TEXT("vcl*.res"); // std::_tstring mystr; @@ -233,7 +233,7 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle ) } else { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); // Property empty -> no office installed if ( sOfficeInstallPath.length() == 0 ) return ERROR_SUCCESS; diff --git a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx index 28dfcc0e18b6..7dc5194a18cb 100644 --- a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx +++ b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx @@ -100,7 +100,7 @@ extern "C" UINT __stdcall copyEditionData(MSIHANDLE install) { wchar_t * end; boost::scoped_array<wchar_t> to( getProperty( - install, L"OFFICEINSTALLLOCATION", + install, L"INSTALLLOCATION", LCL_STRING0(L"program\\edition\0"), &end)); if (!to) { return ERROR_INSTALL_FAILURE; diff --git a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx index 522c52a9aac9..517915cb831f 100644 --- a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx +++ b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx @@ -93,7 +93,7 @@ extern "C" UINT __stdcall copyExtensionData(MSIHANDLE handle) { bool fSuccess = true; bool bFailIfExist = true; - std::_tstring sDestDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ); + std::_tstring sDestDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); std::_tstring sShareInstallDir = sDestDir + TEXT("share\\extension\\install\\"); // creating directories diff --git a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx index 2b022cfb3b8e..f7cf0247c631 100644 --- a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx +++ b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx @@ -161,18 +161,6 @@ extern "C" UINT __stdcall ShowProperties(MSIHANDLE handle) string myText = TEXT("INSTALLLOCATION: ") + property; MessageBox(NULL, myText.c_str(), "INSTALLLOCATION", MB_OK); - property = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); - myText = TEXT("UREINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "UREINSTALLLOCATION", MB_OK); - - property = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - myText = TEXT("BASISINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "BASISINSTALLLOCATION", MB_OK); - - property = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - myText = TEXT("OFFICEINSTALLLOCATION: ") + property; - MessageBox(NULL, myText.c_str(), "OFFICEINSTALLLOCATION", MB_OK); - property = GetMsiProperty(handle, TEXT("Installed")); myText = TEXT("Installed: ") + property; MessageBox(NULL, myText.c_str(), "Installed", MB_OK); diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx index 114e24955820..fb0897e728fe 100644 --- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx +++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx @@ -98,12 +98,14 @@ namespace extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); - string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION")); - string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION")); + string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); - string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link"); - string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); + string sOfficeInstallPath = sInstallPath; + string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); + string sUreInstallPath = sInstallPath + TEXT("URE\\"); + + string sBasisLinkPath = sInstallPath + TEXT("basis-link"); + string sUreLinkPath = sInstallPath + TEXT("Basis\\ure-link"); if ( IsSetMsiProperty(handle, TEXT("ADMININSTALL")) ) { @@ -208,9 +210,11 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle) extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle) { - string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEUNINSTALLLOCATION")); - string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISUNINSTALLLOCATION")); - string sUreInstallPath = GetMsiProperty(handle, TEXT("UREUNINSTALLLOCATION")); + string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); + + string sOfficeInstallPath = sInstallPath; + string sBasisInstallPath = sInstallPath + TEXT("Basis\\"); + string sUreInstallPath = sInstallPath + TEXT("URE\\"); string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link"); string sUreLinkPath = sBasisInstallPath + TEXT("ure-link"); diff --git a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx index 1d3692e456b0..c8035799a539 100755 --- a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx +++ b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx @@ -91,27 +91,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle ) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK ); - } - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; @@ -123,27 +102,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) - { - sInstDir = szValue; - MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str()); - // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK ); - } - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; diff --git a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx index bb339953ff34..ea9bfae3864b 100755 --- a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx +++ b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx @@ -115,7 +115,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle ) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -123,7 +123,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle ) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx index 191bb5fad393..3906d2584fd1 100644 --- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx +++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx @@ -317,7 +317,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle) { - std::_tstring sInstDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ); + std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ); std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe"); std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\"); std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt"); @@ -415,7 +415,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -423,7 +423,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -533,7 +533,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } @@ -541,7 +541,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle) } else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) ) { - if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) + if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) ) { sInstDir = szValue; } diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx index 49d5e50be426..5adab408139d 100644 --- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx +++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx @@ -78,7 +78,7 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle ) // MessageBox(NULL, sDesktopFile.c_str(), TEXT("OfficeMenuFolder"), MB_OK | MB_ICONINFORMATION); - std::_tstring sIconFile = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ) + TEXT("program\\soffice.exe"); + std::_tstring sIconFile = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ) + TEXT("program\\soffice.exe"); OSVERSIONINFO osverinfo; osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx index d9c271133ac0..70064b58807c 100644 --- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx +++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx @@ -183,12 +183,12 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath ) extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle ) { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); std::_tstring sRenameSrc = sOfficeInstallPath + TEXT("program"); std::_tstring sRenameDst = sOfficeInstallPath + TEXT("program_old"); -// MessageBox(NULL, sRenameSrc.c_str(), "OFFICEINSTALLLOCATION", MB_OK); +// MessageBox(NULL, sRenameSrc.c_str(), "INSTALLLOCATION", MB_OK); bool bSuccess = MoveFile( sRenameSrc.c_str(), sRenameDst.c_str() ); if ( !bSuccess ) @@ -216,7 +216,7 @@ extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle ) extern "C" UINT __stdcall RemovePrgFolder( MSIHANDLE handle ) { - std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION")); + std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION")); std::_tstring sRemoveDir = sOfficeInstallPath + TEXT("program_old"); // MessageBox(NULL, sRemoveDir.c_str(), "REMOVING OLD DIR", MB_OK); |