summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt1
-rw-r--r--instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt1
-rw-r--r--instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt1
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt1
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt1
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt1
-rw-r--r--scp2/source/ooo/windowscustomaction_ooo.scp30
-rw-r--r--setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx150
-rw-r--r--setup_native/source/win32/customactions/languagepacks/exports.dxp1
-rw-r--r--setup_native/source/win32/customactions/languagepacks/makefile.mk3
-rwxr-xr-xsetup_native/source/win32/customactions/patch/exports.dxp1
-rw-r--r--setup_native/source/win32/customactions/patch/swappatchfiles.cxx40
-rw-r--r--setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx135
-rw-r--r--setup_native/source/win32/customactions/shellextensions/exports.dxp1
-rw-r--r--setup_native/source/win32/customactions/shellextensions/makefile.mk1
19 files changed, 2 insertions, 372 deletions
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
index 7af1c7b26429..997515a9a62e 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/CustomAc.idt
@@ -7,4 +7,3 @@ setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
index 90ba9c6a6005..7d22ecbbbe1a 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/InstallE.idt
@@ -49,7 +49,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
index 0f3ed1e1bba3..a4b5edc3b9a1 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
@@ -28,7 +28,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
index 7af1c7b26429..997515a9a62e 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
@@ -7,4 +7,3 @@ setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
index 90ba9c6a6005..7d22ecbbbe1a 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
@@ -49,7 +49,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
index 0f3ed1e1bba3..a4b5edc3b9a1 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/Property.idt
@@ -28,7 +28,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
index b80d173a1262..29325b2bd42b 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
+++ b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
@@ -6,6 +6,3 @@ en-US = "The same version of this product is already installed."
[OOO_CUSTOMACTION_3]
en-US = "An older version of [ProductName] was found. To install a newer version, the older version needs to be removed first."
-
-[OOO_CUSTOMACTION_4]
-en-US = "Setup detected a running soffice.bin process. Before you restart the installation, please exit the application that owns soffice.bin. It can be LibreOffice, OpenOffice.org, Lotus Symphony, etc. Also check for the running Quickstarter on Windows taskbar. If you are using a multi-user system, also make sure that no other user has this application open."
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
index 4d7125f4c7de..41c2de258377 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
@@ -13,4 +13,3 @@ SetLanguageSelected 51 LANG_SELECTED 1
ResetLanguageSelected 51 LANG_SELECTED 0
SetApplicationSelected 51 APP_SELECTED 1
ResetApplicationSelected 51 APP_SELECTED 0
-RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
index c4db5c2797a7..bf9367bbf3a7 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
@@ -50,7 +50,6 @@ RemoveIniValues 1550
RemoveODBC 1200
RemoveRegistryValues 1300
RemoveShortcuts 1600
-RunningOffice OFFICERUNS="1" 135
RMCCPSearch Not CCP_SUCCESS And CCP_TEST 250
SameProductFound SAMEPRODUCTS 120
ScheduleReboot ISSCHEDULEREBOOT 3125
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
index 920251e1b406..979b58f0af49 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
@@ -29,7 +29,6 @@ ISSCRIPT_VERSION_MISSING IDS_ISSCRIPT_VERSION_MISSING
ISSCRIPT_VERSION_OLD IDS_ISSCRIPT_VERSION_OLD
ISVROOT_PORT_NO 0
Manufacturer MANUFACTURERTEMPLATE
-OFFICERUNS 0
PIDTemplate 12345<###-%%%%%%%>@@@@@
ProductCode PRODUCTCODETEMPLATE
ProductID none
diff --git a/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp
index 2fdae2c2804d..3733fb3e4a51 100644
--- a/scp2/source/ooo/windowscustomaction_ooo.scp
+++ b/scp2/source/ooo/windowscustomaction_ooo.scp
@@ -107,7 +107,7 @@ WindowsCustomAction gid_Customaction_sdqsmsidll
Source = "sdqsmsi.dll";
Target = "ShutDownQuickstarter";
Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "", "IsOfficeRunning");
+ Assignment1 = ("InstallExecuteSequence", "", "CCPSearch");
End
WindowsCustomAction gid_Customaction_qslnkmsidll
@@ -321,34 +321,6 @@ WindowsCustomAction gid_Customaction_Patch_Shutdownquickstarter
Assignment2 = ("InstallExecuteSequence", "", "IsolateComponents");
End
-WindowsCustomAction gid_Customaction_Patch_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "321";
- Source = "patchmsi.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("ControlEvent", "ReadyToInstall", "InstallNow", "DoAction", "IsOfficeRunning", "1", "1");
- Assignment2 = ("InstallExecuteSequence", "VersionNT < 600", "RunningOffice");
-End
-
-WindowsCustomAction gid_Customaction_Full_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "65";
- Source = "shlxtmsi.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "VersionNT < 600 Or Not PATCH", "RunningOffice");
-End
-
-WindowsCustomAction gid_Customaction_Langpack_Isofficerunning
- Name = "IsOfficeRunning";
- Typ = "65";
- Source = "lngpckinsthlp.dll";
- Target = "IsOfficeRunning";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "PATCH And VersionNT < 600", "RunningOffice");
-End
-
WindowsCustomAction gid_Customaction_CheckPatchList
Name = "CheckPatchList";
Typ = "65";
diff --git a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
deleted file mode 100644
index ff1efc050293..000000000000
--- a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define _WIN32_WINDOWS 0x0410
-
-#ifdef _MSC_VER
-#pragma warning(push, 1) /* disable warnings within system headers */
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msiquery.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <malloc.h>
-#include <assert.h>
-
-#ifdef UNICODE
-#define _UNICODE
-#define _tstring wstring
-#else
-#define _tstring string
-#endif
-#include <tchar.h>
-#include <string>
-#include <queue>
-#include <stdio.h>
-#include <sal/macros.h>
-
-#include <systools/win32/uwinapi.h>
-#include <../tools/seterror.hxx>
-
-#ifdef DEBUG
-inline void OutputDebugStringFormat( LPCTSTR pFormat, ... )
-{
- _TCHAR buffer[1024];
- va_list args;
-
- va_start( args, pFormat );
- _vsntprintf( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
- OutputDebugString( buffer );
-}
-#else
-static inline void OutputDebugStringFormat( LPCTSTR, ... )
-{
-}
-#endif
-
-static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
-{
- std::_tstring result;
- TCHAR szDummy[1] = TEXT("");
- DWORD nChars = 0;
-
- if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA )
- {
- DWORD nBytes = ++nChars * sizeof(TCHAR);
- LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
- ZeroMemory( buffer, nBytes );
- MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
- result = buffer;
- }
-
- return result;
-}
-
-static inline bool IsSetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- std::_tstring value = GetMsiProperty(handle, sProperty);
- return (value.length() > 0);
-}
-
-static inline void UnsetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- MsiSetProperty(handle, sProperty.c_str(), NULL);
-}
-
-static inline void SetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
- MsiSetProperty(handle, sProperty.c_str(), TEXT("1"));
-}
-
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- 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;
- HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( IsValidHandle(hFind) )
- {
- BOOL fSuccess = false;
- bool fRenameSucceeded;
-
- do
- {
- std::_tstring sResourceFile = sResourceDir + aFindFileData.cFileName;
- std::_tstring sIntermediate = sResourceFile + TEXT(".tmp");
-
- fRenameSucceeded = MoveFileExA( sResourceFile.c_str(), sIntermediate.c_str(), MOVEFILE_REPLACE_EXISTING );
- if ( fRenameSucceeded )
- {
- MoveFileExA( sIntermediate.c_str(), sResourceFile.c_str(), 0 );
- fSuccess = FindNextFile( hFind, &aFindFileData );
- }
- } while ( fSuccess && fRenameSucceeded );
-
- if ( !fRenameSucceeded )
- {
- MsiSetProperty(handle, TEXT("OFFICERUNS"), TEXT("1"));
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
-
- FindClose( hFind );
- }
-
- return ERROR_SUCCESS;
-}
-
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/customactions/languagepacks/exports.dxp b/setup_native/source/win32/customactions/languagepacks/exports.dxp
index c098a38d547f..eb3e3c34829a 100644
--- a/setup_native/source/win32/customactions/languagepacks/exports.dxp
+++ b/setup_native/source/win32/customactions/languagepacks/exports.dxp
@@ -1,6 +1,5 @@
SetProductInstallationPath
RegisterLanguagePack
GetUserInstallMode
-IsOfficeRunning
RegisterExtensions
diff --git a/setup_native/source/win32/customactions/languagepacks/makefile.mk b/setup_native/source/win32/customactions/languagepacks/makefile.mk
index 94eab3a0109c..f30ec08c0f6b 100644
--- a/setup_native/source/win32/customactions/languagepacks/makefile.mk
+++ b/setup_native/source/win32/customactions/languagepacks/makefile.mk
@@ -49,8 +49,7 @@ CDEFS+=-Dnot_used_define_to_disable_pch
UWINAPILIB=
SLOFILES = $(SLO)$/lngpckinsthelper.obj \
- $(SLO)$/respintest.obj \
- $(SLO)$/checkrunningofficelanguagepack.obj
+ $(SLO)$/respintest.obj
STDSHL+= \
$(ADVAPI32LIB) \
diff --git a/setup_native/source/win32/customactions/patch/exports.dxp b/setup_native/source/win32/customactions/patch/exports.dxp
index dd5eb4dcf7c8..360156e6c25b 100755
--- a/setup_native/source/win32/customactions/patch/exports.dxp
+++ b/setup_native/source/win32/customactions/patch/exports.dxp
@@ -3,7 +3,6 @@ UninstallPatchedFiles
GetUserInstallMode
SetProductInstallMode
ShutDownQuickstarter
-IsOfficeRunning
SetFeatureState
SetNewFeatureState
ShowOnlineUpdateDialog
diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index c0c6fd278efa..7f83ca57b29f 100644
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -576,46 +576,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
return ERROR_SUCCESS;
}
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
- std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\");
- std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
-
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( sPattern.c_str(), &aFindFileData );
-
- if ( IsValidHandle(hFind) )
- {
- BOOL fSuccess = false;
- bool fRenameSucceeded;
-
- do
- {
- std::_tstring sResourceFile = sResourceDir + aFindFileData.cFileName;
- std::_tstring sIntermediate = sResourceFile + TEXT(".tmp");
-
- fRenameSucceeded = MoveFileExA( sResourceFile.c_str(), sIntermediate.c_str(), MOVEFILE_REPLACE_EXISTING );
- if ( fRenameSucceeded )
- {
- MoveFileExA( sIntermediate.c_str(), sResourceFile.c_str(), 0 );
- fSuccess = FindNextFile( hFind, &aFindFileData );
- }
- } while ( fSuccess && fRenameSucceeded );
-
- if ( !fRenameSucceeded )
- {
- MsiSetProperty(handle, TEXT("OFFICERUNS"), TEXT("1"));
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
-
- FindClose( hFind );
- }
-
-
- return ERROR_SUCCESS;
-}
-
extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
{
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
deleted file mode 100644
index c1319e25e98c..000000000000
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define _WIN32_WINDOWS 0x0410
-
-#ifdef _MSC_VER
-#pragma warning(push, 1) /* disable warnings within system headers */
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msiquery.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#include <malloc.h>
-#include <assert.h>
-
-#ifdef UNICODE
-#define _UNICODE
-#define _tstring wstring
-#else
-#define _tstring string
-#endif
-#include <tchar.h>
-#include <string>
-#include <queue>
-#include <stdio.h>
-#include <sal/macros.h>
-
-// works with Windows XP as well as with Windows 7
-#define PSAPI_VERSION 1
-#include <psapi.h>
-
-#include <systools/win32/uwinapi.h>
-#include <../tools/seterror.hxx>
-
-#ifdef DEBUG
-inline void OutputDebugStringFormat( LPCTSTR pFormat, ... )
-{
- _TCHAR buffer[1024];
- va_list args;
-
- va_start( args, pFormat );
- _vsntprintf( buffer, SAL_N_ELEMENTS(buffer), pFormat, args );
- OutputDebugString( buffer );
-}
-#else
-static inline void OutputDebugStringFormat( LPCTSTR, ... )
-{
-}
-#endif
-
-static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
-{
- std::_tstring result;
- TCHAR szDummy[1] = TEXT("");
- DWORD nChars = 0;
-
- if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == ERROR_MORE_DATA )
- {
- DWORD nBytes = ++nChars * sizeof(TCHAR);
- LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(nBytes));
- ZeroMemory( buffer, nBytes );
- MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
- result = buffer;
- }
-
- return result;
-}
-
-extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
-{
- std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
- // Property empty -> no office installed
- if ( sOfficeInstallPath.length() == 0 )
- return ERROR_SUCCESS;
-
- DWORD aProcesses[1024], cbNeeded, cProcesses; /* 1024 processes ought to be enough for anybody */
-
- if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
- return ERROR_INSTALL_FAILURE;
-
- cProcesses = cbNeeded / sizeof(DWORD);
-
- // Check if there is "soffice.bin" among the processes
- for ( unsigned int i = 0; i < cProcesses; i++ )
- {
- if( aProcesses[i] != 0 )
- {
- TCHAR szProcessName[MAX_PATH] = TEXT("<unknown>");
- HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, aProcesses[i] );
- if (NULL != hProcess )
- {
- HMODULE hMod;
- if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), &cbNeeded) )
- GetModuleBaseName( hProcess, hMod, szProcessName, sizeof(szProcessName)/sizeof(TCHAR) );
- }
- CloseHandle( hProcess );
- if ( _tcscmp( szProcessName, TEXT("soffice.bin") ) == 0 )
- {
- MsiSetProperty( handle, TEXT("OFFICERUNS"), TEXT("1") );
- SetMsiErrorCode( MSI_ERROR_OFFICE_IS_RUNNING );
- }
- }
- }
- return ERROR_SUCCESS;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/customactions/shellextensions/exports.dxp b/setup_native/source/win32/customactions/shellextensions/exports.dxp
index 4e2611946586..474df7651882 100644
--- a/setup_native/source/win32/customactions/shellextensions/exports.dxp
+++ b/setup_native/source/win32/customactions/shellextensions/exports.dxp
@@ -16,6 +16,5 @@ ShowProperties
copyEditionData
RenamePrgFolder
RemovePrgFolder
-IsOfficeRunning
CheckPatchList
copyExtensionData
diff --git a/setup_native/source/win32/customactions/shellextensions/makefile.mk b/setup_native/source/win32/customactions/shellextensions/makefile.mk
index 3a15e3510cbe..fbebd6e1bb87 100644
--- a/setup_native/source/win32/customactions/shellextensions/makefile.mk
+++ b/setup_native/source/win32/customactions/shellextensions/makefile.mk
@@ -61,7 +61,6 @@ SLOFILES = \
$(SLO)$/registerextensions.obj \
$(SLO)$/copyeditiondata.obj \
$(SLO)$/vistaspecial.obj \
- $(SLO)$/checkrunningoffice.obj \
$(SLO)$/checkpatches.obj \
$(SLO)$/copyextensiondata.obj