summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-07-29 12:41:44 +0200
committerobo <obo@openoffice.org>2010-07-29 12:41:44 +0200
commit2ae7ed978e22dbb6fc5e84c3dc686ab4bb9e1cec (patch)
treea80e4bab712d11354de25cf8cdacbeaa48d5c3b8 /setup_native
parent5ad652d4bd2969082018f03ad80bf683611ab5b9 (diff)
parent232fc9070c8a86f6602cf4134d4b5b8a1cf117a7 (diff)
CWS-TOOLING: integrate CWS dv19
Notes
Notes: split repo tag: components_ooo/DEV300_m86
Diffstat (limited to 'setup_native')
-rwxr-xr-x[-rw-r--r--]setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
index 3aba597098fb..b6050cb0c2d5 100644..100755
--- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
+++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
@@ -116,14 +116,43 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey )
{ // We will replace registration for word pad
bRet = true;
}
- if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 )
+ else if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 )
{ // We will replace registration for our own types, too
bRet = true;
}
- if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 )
+ else if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 )
{ // We will replace registration for ooostub, too
bRet = true;
}
+ else
+ {
+ OutputDebugStringFormat( " Checking OpenWithList of [%s].\n", lpSubKey );
+ HKEY hSubKey;
+ lResult = RegOpenKeyExA( hKey, "OpenWithList", 0, KEY_ENUMERATE_SUB_KEYS, &hSubKey );
+ if ( ERROR_SUCCESS == lResult )
+ {
+ DWORD nIndex = 0;
+ while ( ERROR_SUCCESS == lResult )
+ {
+ nSize = sizeof( szBuffer );
+ lResult = RegEnumKeyExA( hSubKey, nIndex++, szBuffer, &nSize, NULL, NULL, NULL, NULL );
+ if ( ERROR_SUCCESS == lResult )
+ {
+ OutputDebugStringFormat( " Found value [%s] in OpenWithList of [%s].\n", szBuffer, lpSubKey );
+ if ( strncmp( szBuffer, "WordPad.exe", 11 ) == 0 )
+ { // We will replace registration for word pad
+ bRet = true;
+ }
+ else if ( nSize > 0 )
+ bRet = false;
+ }
+ }
+ }
+ else
+ {
+ OutputDebugStringFormat( " No OpenWithList found!\n" );
+ }
+ }
}
else // no default value found -> return TRUE to register for that key
bRet = true;