2003-08-13 01:27:48 +00:00
|
|
|
/*
|
|
|
|
* Implementation of the Microsoft Installer (msi.dll)
|
|
|
|
*
|
2005-01-24 11:22:00 +00:00
|
|
|
* Copyright 2002,2003,2004,2005 Mike McCormack for CodeWeavers
|
2003-08-13 01:27:48 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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 for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2004-10-07 03:06:48 +00:00
|
|
|
#define COBJMACROS
|
|
|
|
#define NONAMELESSUNION
|
|
|
|
|
2003-08-13 01:27:48 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winreg.h"
|
2003-09-27 02:24:31 +00:00
|
|
|
#include "winnls.h"
|
2003-08-13 01:27:48 +00:00
|
|
|
#include "shlwapi.h"
|
|
|
|
#include "wine/debug.h"
|
|
|
|
#include "msi.h"
|
|
|
|
#include "msiquery.h"
|
|
|
|
#include "msipriv.h"
|
2003-09-01 23:57:06 +00:00
|
|
|
#include "wincrypt.h"
|
2004-09-06 21:25:48 +00:00
|
|
|
#include "winver.h"
|
2005-01-24 11:22:00 +00:00
|
|
|
#include "winuser.h"
|
2005-04-20 12:50:05 +00:00
|
|
|
#include "wine/unicode.h"
|
2005-05-23 16:23:54 +00:00
|
|
|
#include "action.h"
|
2003-08-13 01:27:48 +00:00
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(msi);
|
|
|
|
|
2004-03-16 19:18:22 +00:00
|
|
|
/*
|
|
|
|
* The MSVC headers define the MSIDBOPEN_* macros cast to LPCTSTR,
|
|
|
|
* which is a problem because LPCTSTR isn't defined when compiling wine.
|
|
|
|
* To work around this problem, we need to define LPCTSTR as LPCWSTR here,
|
|
|
|
* and make sure to only use it in W functions.
|
|
|
|
*/
|
|
|
|
#define LPCTSTR LPCWSTR
|
|
|
|
|
2004-07-04 00:26:54 +00:00
|
|
|
/* the UI level */
|
2005-01-24 12:55:31 +00:00
|
|
|
INSTALLUILEVEL gUILevel = INSTALLUILEVEL_BASIC;
|
|
|
|
HWND gUIhwnd = 0;
|
|
|
|
INSTALLUI_HANDLERA gUIHandlerA = NULL;
|
|
|
|
INSTALLUI_HANDLERW gUIHandlerW = NULL;
|
|
|
|
DWORD gUIFilter = 0;
|
|
|
|
LPVOID gUIContext = NULL;
|
2004-07-09 19:26:30 +00:00
|
|
|
WCHAR gszLogFile[MAX_PATH];
|
2005-02-08 12:12:29 +00:00
|
|
|
HINSTANCE msi_hInstance;
|
2004-07-04 00:26:54 +00:00
|
|
|
|
2005-05-11 12:01:12 +00:00
|
|
|
static const WCHAR installerW[] = {'\\','I','n','s','t','a','l','l','e','r',0};
|
|
|
|
|
2003-08-13 01:27:48 +00:00
|
|
|
UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct)
|
|
|
|
{
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r;
|
2003-10-30 22:47:42 +00:00
|
|
|
LPWSTR szwProd = NULL;
|
|
|
|
|
|
|
|
TRACE("%s %p\n",debugstr_a(szProduct), phProduct);
|
|
|
|
|
|
|
|
if( szProduct )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProd = strdupAtoW( szProduct );
|
|
|
|
if( !szwProd )
|
|
|
|
return ERROR_OUTOFMEMORY;
|
2003-10-30 22:47:42 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
r = MsiOpenProductW( szwProd, phProduct );
|
2003-10-30 22:47:42 +00:00
|
|
|
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwProd );
|
2003-10-30 22:47:42 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiOpenProductW(LPCWSTR szProduct, MSIHANDLE *phProduct)
|
|
|
|
{
|
2004-04-19 20:12:14 +00:00
|
|
|
static const WCHAR szLocalPackage[] = {
|
2003-11-05 00:34:51 +00:00
|
|
|
'L','o','c','a','l','P','a','c','k','a','g','e', 0
|
|
|
|
};
|
|
|
|
LPWSTR path = NULL;
|
|
|
|
UINT r;
|
2005-01-25 10:58:36 +00:00
|
|
|
HKEY hKeyProduct = NULL;
|
2003-11-05 00:34:51 +00:00
|
|
|
DWORD count, type;
|
|
|
|
|
|
|
|
TRACE("%s %p\n",debugstr_w(szProduct), phProduct);
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
r = MSIREG_OpenUninstallKey(szProduct,&hKeyProduct,FALSE);
|
2003-11-05 00:34:51 +00:00
|
|
|
if( r != ERROR_SUCCESS )
|
2004-06-28 20:34:35 +00:00
|
|
|
{
|
|
|
|
r = ERROR_UNKNOWN_PRODUCT;
|
2003-11-05 00:34:51 +00:00
|
|
|
goto end;
|
2004-06-28 20:34:35 +00:00
|
|
|
}
|
2003-11-05 00:34:51 +00:00
|
|
|
|
|
|
|
/* find the size of the path */
|
|
|
|
type = count = 0;
|
|
|
|
r = RegQueryValueExW( hKeyProduct, szLocalPackage,
|
|
|
|
NULL, &type, NULL, &count );
|
|
|
|
if( r != ERROR_SUCCESS )
|
2004-06-28 20:34:35 +00:00
|
|
|
{
|
|
|
|
r = ERROR_UNKNOWN_PRODUCT;
|
2003-11-05 00:34:51 +00:00
|
|
|
goto end;
|
2004-06-28 20:34:35 +00:00
|
|
|
}
|
2003-11-05 00:34:51 +00:00
|
|
|
|
|
|
|
/* now alloc and fetch the path of the database to open */
|
|
|
|
path = HeapAlloc( GetProcessHeap(), 0, count );
|
|
|
|
if( !path )
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
r = RegQueryValueExW( hKeyProduct, szLocalPackage,
|
|
|
|
NULL, &type, (LPBYTE) path, &count );
|
|
|
|
if( r != ERROR_SUCCESS )
|
2004-06-28 20:34:35 +00:00
|
|
|
{
|
|
|
|
r = ERROR_UNKNOWN_PRODUCT;
|
2003-11-05 00:34:51 +00:00
|
|
|
goto end;
|
2004-06-28 20:34:35 +00:00
|
|
|
}
|
2003-11-05 00:34:51 +00:00
|
|
|
|
|
|
|
r = MsiOpenPackageW( path, phProduct );
|
|
|
|
|
|
|
|
end:
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, path );
|
2003-11-05 00:34:51 +00:00
|
|
|
if( hKeyProduct )
|
|
|
|
RegCloseKey( hKeyProduct );
|
|
|
|
|
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiAdvertiseProductA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
|
|
|
|
LPCSTR szTransforms, LANGID lgidLanguage)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %s %08x\n",debugstr_a(szPackagePath),
|
|
|
|
debugstr_a(szScriptfilePath), debugstr_a(szTransforms), lgidLanguage);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiAdvertiseProductW(LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
|
|
|
|
LPCWSTR szTransforms, LANGID lgidLanguage)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %s %08x\n",debugstr_w(szPackagePath),
|
|
|
|
debugstr_w(szScriptfilePath), debugstr_w(szTransforms), lgidLanguage);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiAdvertiseProductExA(LPCSTR szPackagePath, LPCSTR szScriptfilePath,
|
|
|
|
LPCSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_a(szPackagePath),
|
|
|
|
debugstr_a(szScriptfilePath), debugstr_a(szTransforms),
|
|
|
|
lgidLanguage, dwPlatform, dwOptions);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiAdvertiseProductExW( LPCWSTR szPackagePath, LPCWSTR szScriptfilePath,
|
|
|
|
LPCWSTR szTransforms, LANGID lgidLanguage, DWORD dwPlatform, DWORD dwOptions)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %s %08x %08lx %08lx\n", debugstr_w(szPackagePath),
|
|
|
|
debugstr_w(szScriptfilePath), debugstr_w(szTransforms),
|
|
|
|
lgidLanguage, dwPlatform, dwOptions);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2003-08-13 01:27:48 +00:00
|
|
|
UINT WINAPI MsiInstallProductA(LPCSTR szPackagePath, LPCSTR szCommandLine)
|
|
|
|
{
|
|
|
|
LPWSTR szwPath = NULL, szwCommand = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r = ERROR_OUTOFMEMORY;
|
2003-08-13 01:27:48 +00:00
|
|
|
|
|
|
|
TRACE("%s %s\n",debugstr_a(szPackagePath), debugstr_a(szCommandLine));
|
|
|
|
|
|
|
|
if( szPackagePath )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwPath = strdupAtoW( szPackagePath );
|
2003-09-27 02:24:31 +00:00
|
|
|
if( !szwPath )
|
|
|
|
goto end;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( szCommandLine )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwCommand = strdupAtoW( szCommandLine );
|
2003-09-27 02:24:31 +00:00
|
|
|
if( !szwCommand )
|
|
|
|
goto end;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2003-08-13 01:27:48 +00:00
|
|
|
r = MsiInstallProductW( szwPath, szwCommand );
|
|
|
|
|
|
|
|
end:
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwPath );
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwCommand );
|
2003-08-13 01:27:48 +00:00
|
|
|
|
|
|
|
return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
|
|
|
|
{
|
2004-07-09 22:25:34 +00:00
|
|
|
MSIPACKAGE *package = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r;
|
2004-07-09 22:25:34 +00:00
|
|
|
MSIHANDLE handle;
|
2005-06-28 19:14:30 +00:00
|
|
|
WCHAR path[MAX_PATH];
|
|
|
|
WCHAR filename[MAX_PATH];
|
|
|
|
static const WCHAR szMSI[] = {'M','S','I',0};
|
2004-06-28 20:34:35 +00:00
|
|
|
|
2003-08-13 01:27:48 +00:00
|
|
|
FIXME("%s %s\n",debugstr_w(szPackagePath), debugstr_w(szCommandLine));
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
r = MsiVerifyPackageW(szPackagePath);
|
|
|
|
if (r != ERROR_SUCCESS)
|
|
|
|
return r;
|
2004-06-28 20:34:35 +00:00
|
|
|
|
2005-06-28 19:14:30 +00:00
|
|
|
/* copy the msi file to a temp file to pervent locking a CD
|
|
|
|
* with a multi disc install
|
|
|
|
*/
|
|
|
|
GetTempPathW(MAX_PATH, path);
|
|
|
|
GetTempFileNameW(path, szMSI, 0, filename);
|
|
|
|
|
|
|
|
CopyFileW(szPackagePath, filename, FALSE);
|
|
|
|
|
|
|
|
TRACE("Opening relocated package %s\n",debugstr_w(filename));
|
|
|
|
r = MSI_OpenPackageW(filename, &package);
|
2005-03-29 11:28:57 +00:00
|
|
|
if (r != ERROR_SUCCESS)
|
2005-06-28 19:14:30 +00:00
|
|
|
{
|
|
|
|
DeleteFileW(filename);
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2005-06-28 19:14:30 +00:00
|
|
|
}
|
2004-06-28 20:34:35 +00:00
|
|
|
|
2004-07-09 22:25:34 +00:00
|
|
|
handle = alloc_msihandle( &package->hdr );
|
|
|
|
|
2005-06-28 19:14:30 +00:00
|
|
|
r = ACTION_DoTopLevelINSTALL(package, szPackagePath, szCommandLine,
|
|
|
|
filename);
|
2004-06-28 20:34:35 +00:00
|
|
|
|
2004-07-09 22:25:34 +00:00
|
|
|
MsiCloseHandle(handle);
|
|
|
|
msiobj_release( &package->hdr );
|
2005-06-28 19:14:30 +00:00
|
|
|
|
|
|
|
DeleteFileW(filename);
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2004-07-19 21:19:45 +00:00
|
|
|
UINT WINAPI MsiReinstallProductA(LPCSTR szProduct, DWORD dwReinstallMode)
|
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %08lx\n", debugstr_a(szProduct), dwReinstallMode);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
2004-07-19 21:19:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiReinstallProductW(LPCWSTR szProduct, DWORD dwReinstallMode)
|
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %08lx\n", debugstr_w(szProduct), dwReinstallMode);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
2004-07-19 21:19:45 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiApplyPatchA(LPCSTR szPatchPackage, LPCSTR szInstallPackage,
|
|
|
|
INSTALLTYPE eInstallType, LPCSTR szCommandLine)
|
2004-07-29 02:39:20 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %d %s\n", debugstr_a(szPatchPackage), debugstr_a(szInstallPackage),
|
|
|
|
eInstallType, debugstr_a(szCommandLine));
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
2004-07-29 02:39:20 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiApplyPatchW(LPCWSTR szPatchPackage, LPCWSTR szInstallPackage,
|
|
|
|
INSTALLTYPE eInstallType, LPCWSTR szCommandLine)
|
2004-07-29 02:39:20 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %d %s\n", debugstr_w(szPatchPackage), debugstr_w(szInstallPackage),
|
|
|
|
eInstallType, debugstr_w(szCommandLine));
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
2004-07-29 02:39:20 +00:00
|
|
|
}
|
|
|
|
|
2005-01-19 16:58:03 +00:00
|
|
|
UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel,
|
|
|
|
INSTALLSTATE eInstallState, LPCWSTR szCommandLine)
|
|
|
|
{
|
2005-05-20 18:59:11 +00:00
|
|
|
MSIHANDLE handle = -1;
|
2005-01-19 16:58:03 +00:00
|
|
|
MSIPACKAGE* package;
|
|
|
|
UINT rc;
|
2005-01-25 10:58:36 +00:00
|
|
|
HKEY hkey=0,hkey1=0;
|
2005-01-19 16:58:03 +00:00
|
|
|
DWORD sz;
|
|
|
|
static const WCHAR szSouceList[] = {
|
|
|
|
'S','o','u','r','c','e','L','i','s','t',0};
|
|
|
|
static const WCHAR szLUS[] = {
|
|
|
|
'L','a','s','t','U','s','e','d','S','o','u','r','c','e',0};
|
|
|
|
WCHAR sourcepath[0x200];
|
|
|
|
static const WCHAR szInstalled[] = {
|
|
|
|
' ','I','n','s','t','a','l','l','e','d','=','1',0};
|
|
|
|
LPWSTR commandline;
|
|
|
|
|
|
|
|
FIXME("%s %d %d %s\n",debugstr_w(szProduct), iInstallLevel, eInstallState,
|
2005-01-24 11:22:00 +00:00
|
|
|
debugstr_w(szCommandLine));
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
if (eInstallState != INSTALLSTATE_LOCAL &&
|
2005-01-25 10:58:36 +00:00
|
|
|
eInstallState != INSTALLSTATE_DEFAULT)
|
2005-01-19 16:58:03 +00:00
|
|
|
{
|
|
|
|
FIXME("Not implemented for anything other than local installs\n");
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = MSIREG_OpenUserProductsKey(szProduct,&hkey,FALSE);
|
2005-01-19 16:58:03 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = RegOpenKeyW(hkey,szSouceList,&hkey1);
|
2005-01-19 16:58:03 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
sz = sizeof(sourcepath);
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = RegQueryValueExW(hkey1, szLUS, NULL, NULL,(LPBYTE)sourcepath, &sz);
|
2005-01-19 16:58:03 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
2005-01-25 10:58:36 +00:00
|
|
|
|
|
|
|
RegCloseKey(hkey1);
|
2005-01-19 16:58:03 +00:00
|
|
|
/*
|
|
|
|
* ok 1, we need to find the msi file for this product.
|
|
|
|
* 2, find the source dir for the files
|
|
|
|
* 3, do the configure/install.
|
2005-03-29 11:28:57 +00:00
|
|
|
* 4, cleanupany runonce entry.
|
2005-01-19 16:58:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
rc = MsiOpenProductW(szProduct,&handle);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
|
2005-03-10 11:15:40 +00:00
|
|
|
if (!package)
|
|
|
|
{
|
|
|
|
rc = ERROR_INVALID_HANDLE;
|
|
|
|
goto end;
|
|
|
|
}
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-03-24 19:04:06 +00:00
|
|
|
sz = lstrlenW(szInstalled);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
|
|
|
if (szCommandLine)
|
2005-03-24 19:04:06 +00:00
|
|
|
sz += lstrlenW(szCommandLine);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
|
|
|
commandline = HeapAlloc(GetProcessHeap(),0,sz * sizeof(WCHAR));
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
if (szCommandLine)
|
|
|
|
lstrcpyW(commandline,szCommandLine);
|
2005-01-19 16:58:03 +00:00
|
|
|
else
|
|
|
|
commandline[0] = 0;
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
if (MsiQueryProductStateW(szProduct) != INSTALLSTATE_UNKNOWN)
|
2005-03-29 11:28:57 +00:00
|
|
|
lstrcatW(commandline,szInstalled);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-06-28 19:14:30 +00:00
|
|
|
rc = ACTION_DoTopLevelINSTALL(package, sourcepath, commandline, sourcepath);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-02-09 13:22:49 +00:00
|
|
|
msiobj_release( &package->hdr );
|
|
|
|
|
2005-01-19 16:58:03 +00:00
|
|
|
HeapFree(GetProcessHeap(),0,commandline);
|
|
|
|
end:
|
|
|
|
RegCloseKey(hkey);
|
2005-05-20 18:59:11 +00:00
|
|
|
if (handle != -1)
|
|
|
|
MsiCloseHandle(handle);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
UINT WINAPI MsiConfigureProductExA(LPCSTR szProduct, int iInstallLevel,
|
|
|
|
INSTALLSTATE eInstallState, LPCSTR szCommandLine)
|
|
|
|
{
|
|
|
|
LPWSTR szwProduct = NULL;
|
|
|
|
LPWSTR szwCommandLine = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r = ERROR_OUTOFMEMORY;
|
2005-01-25 10:58:36 +00:00
|
|
|
|
|
|
|
if( szProduct )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProduct = strdupAtoW( szProduct );
|
2005-01-25 10:58:36 +00:00
|
|
|
if( !szwProduct )
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( szCommandLine)
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwCommandLine = strdupAtoW( szCommandLine );
|
2005-01-25 10:58:36 +00:00
|
|
|
if( !szwCommandLine)
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
r = MsiConfigureProductExW( szwProduct, iInstallLevel, eInstallState,
|
2005-01-25 10:58:36 +00:00
|
|
|
szwCommandLine );
|
|
|
|
end:
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct );
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwCommandLine);
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2005-01-25 10:58:36 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT WINAPI MsiConfigureProductA(LPCSTR szProduct, int iInstallLevel,
|
2005-01-19 16:58:03 +00:00
|
|
|
INSTALLSTATE eInstallState)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2004-04-28 00:29:25 +00:00
|
|
|
LPWSTR szwProduct = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r;
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
TRACE("%s %d %d\n",debugstr_a(szProduct), iInstallLevel, eInstallState);
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
if( szProduct )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProduct = strdupAtoW( szProduct );
|
2004-04-28 00:29:25 +00:00
|
|
|
if( !szwProduct )
|
2005-03-29 11:28:57 +00:00
|
|
|
return ERROR_OUTOFMEMORY;
|
2004-04-28 00:29:25 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
r = MsiConfigureProductW( szwProduct, iInstallLevel, eInstallState );
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct );
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT WINAPI MsiConfigureProductW(LPCWSTR szProduct, int iInstallLevel,
|
2005-01-19 16:58:03 +00:00
|
|
|
INSTALLSTATE eInstallState)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %d %d\n", debugstr_w(szProduct), iInstallLevel, eInstallState);
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return MsiConfigureProductExW(szProduct, iInstallLevel, eInstallState, NULL);
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiGetProductCodeA(LPCSTR szComponent, LPSTR szBuffer)
|
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
LPWSTR szwComponent = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r;
|
2005-01-24 11:22:00 +00:00
|
|
|
WCHAR szwBuffer[GUID_SIZE];
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
TRACE("%s %s\n",debugstr_a(szComponent), debugstr_a(szBuffer));
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
if( szComponent )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwComponent = strdupAtoW( szComponent );
|
2004-04-28 00:29:25 +00:00
|
|
|
if( !szwComponent )
|
2005-03-29 11:28:57 +00:00
|
|
|
return ERROR_OUTOFMEMORY;
|
2004-04-28 00:29:25 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
r = MsiGetProductCodeW( szwComponent, szwBuffer );
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
if( ERROR_SUCCESS == r )
|
2004-04-28 00:29:25 +00:00
|
|
|
WideCharToMultiByte(CP_ACP, 0, szwBuffer, -1, szBuffer, GUID_SIZE, NULL, NULL);
|
|
|
|
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwComponent );
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer)
|
|
|
|
{
|
2005-05-20 18:59:11 +00:00
|
|
|
UINT rc;
|
|
|
|
HKEY hkey;
|
|
|
|
WCHAR szSquished[GUID_SIZE];
|
|
|
|
DWORD sz = GUID_SIZE;
|
|
|
|
static const WCHAR szPermKey[] =
|
|
|
|
{ '0','0','0','0','0','0','0','0','0','0','0','0',
|
|
|
|
'0','0','0','0','0','0','0', '0','0','0','0','0',
|
|
|
|
'0','0','0','0','0','0','0','0',0};
|
|
|
|
|
|
|
|
TRACE("%s %p\n",debugstr_w(szComponent), szBuffer);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if (NULL == szComponent)
|
|
|
|
return ERROR_INVALID_PARAMETER;
|
2005-05-20 18:59:11 +00:00
|
|
|
|
|
|
|
rc = MSIREG_OpenComponentsKey( szComponent, &hkey, FALSE);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return ERROR_UNKNOWN_COMPONENT;
|
|
|
|
|
|
|
|
rc = RegEnumValueW(hkey, 0, szSquished, &sz, NULL, NULL, NULL, NULL);
|
|
|
|
if (rc == ERROR_SUCCESS && strcmpW(szSquished,szPermKey)==0)
|
|
|
|
{
|
|
|
|
sz = GUID_SIZE;
|
|
|
|
rc = RegEnumValueW(hkey, 1, szSquished, &sz, NULL, NULL, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return ERROR_INSTALL_FAILURE;
|
|
|
|
|
|
|
|
unsquash_guid(szSquished, szBuffer);
|
|
|
|
return ERROR_SUCCESS;
|
2004-04-28 00:29:25 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute,
|
|
|
|
LPSTR szBuffer, DWORD *pcchValueBuf)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2004-04-28 00:29:25 +00:00
|
|
|
LPWSTR szwProduct = NULL, szwAttribute = NULL, szwBuffer = NULL;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r = ERROR_OUTOFMEMORY;
|
2005-06-03 11:24:57 +00:00
|
|
|
DWORD pcchwValueBuf = 0;
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-25 16:38:26 +00:00
|
|
|
TRACE("%s %s %p %p\n", debugstr_a(szProduct), debugstr_a(szAttribute),
|
2005-01-24 11:22:00 +00:00
|
|
|
szBuffer, pcchValueBuf);
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
if( szProduct )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProduct = strdupAtoW( szProduct );
|
2004-04-28 00:29:25 +00:00
|
|
|
if( !szwProduct )
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( szAttribute )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwAttribute = strdupAtoW( szAttribute );
|
2004-04-28 00:29:25 +00:00
|
|
|
if( !szwAttribute )
|
|
|
|
goto end;
|
2005-01-24 11:22:00 +00:00
|
|
|
}
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
if( szBuffer )
|
|
|
|
{
|
|
|
|
szwBuffer = HeapAlloc( GetProcessHeap(), 0, (*pcchValueBuf) * sizeof(WCHAR) );
|
2005-06-03 11:24:57 +00:00
|
|
|
pcchwValueBuf = *pcchValueBuf;
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !szwBuffer )
|
2004-04-28 00:29:25 +00:00
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2005-06-03 11:24:57 +00:00
|
|
|
r = MsiGetProductInfoW( szwProduct, szwAttribute, szwBuffer,
|
|
|
|
&pcchwValueBuf );
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
if( ERROR_SUCCESS == r )
|
2005-06-03 11:24:57 +00:00
|
|
|
*pcchValueBuf = WideCharToMultiByte(CP_ACP, 0, szwBuffer, pcchwValueBuf,
|
|
|
|
szBuffer, *pcchValueBuf, NULL, NULL);
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
end:
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct );
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwAttribute );
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwBuffer );
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute,
|
|
|
|
LPWSTR szBuffer, DWORD *pcchValueBuf)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2004-04-28 00:29:25 +00:00
|
|
|
MSIHANDLE hProduct;
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT r;
|
2005-04-26 14:30:31 +00:00
|
|
|
static const WCHAR szPackageCode[] =
|
|
|
|
{'P','a','c','k','a','g','e','C','o','d','e',0};
|
|
|
|
static const WCHAR szVersionString[] =
|
|
|
|
{'V','e','r','s','i','o','n','S','t','r','i','n','g',0};
|
|
|
|
static const WCHAR szProductVersion[] =
|
|
|
|
{'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0};
|
|
|
|
static const WCHAR szAssignmentType[] =
|
|
|
|
{'A','s','s','i','g','n','m','e','n','t','T','y','p','e',0};
|
2005-06-08 18:35:43 +00:00
|
|
|
static const WCHAR szLanguage[] =
|
|
|
|
{'L','a','n','g','u','a','g','e',0};
|
|
|
|
static const WCHAR szProductLanguage[] =
|
|
|
|
{'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0};
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %p %p\n",debugstr_w(szProduct), debugstr_w(szAttribute),
|
|
|
|
szBuffer, pcchValueBuf);
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if (NULL != szBuffer && NULL == pcchValueBuf)
|
|
|
|
return ERROR_INVALID_PARAMETER;
|
|
|
|
if (NULL == szProduct || NULL == szAttribute)
|
|
|
|
return ERROR_INVALID_PARAMETER;
|
2005-04-26 14:30:31 +00:00
|
|
|
|
|
|
|
/* check for special properties */
|
|
|
|
if (strcmpW(szAttribute, szPackageCode)==0)
|
|
|
|
{
|
|
|
|
HKEY hkey;
|
|
|
|
WCHAR squished[GUID_SIZE];
|
|
|
|
WCHAR package[200];
|
|
|
|
DWORD sz = sizeof(squished);
|
|
|
|
|
|
|
|
r = MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE);
|
|
|
|
if (r != ERROR_SUCCESS)
|
|
|
|
return ERROR_UNKNOWN_PRODUCT;
|
|
|
|
|
|
|
|
r = RegQueryValueExW(hkey, szPackageCode, NULL, NULL,
|
|
|
|
(LPBYTE)squished, &sz);
|
|
|
|
if (r != ERROR_SUCCESS)
|
2005-04-27 08:11:52 +00:00
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
2005-04-26 14:30:31 +00:00
|
|
|
return ERROR_UNKNOWN_PRODUCT;
|
2005-04-27 08:11:52 +00:00
|
|
|
}
|
2005-04-26 14:30:31 +00:00
|
|
|
|
|
|
|
unsquash_guid(squished, package);
|
|
|
|
*pcchValueBuf = strlenW(package);
|
|
|
|
if (strlenW(package) > *pcchValueBuf)
|
2005-04-27 08:11:52 +00:00
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
2005-04-26 14:30:31 +00:00
|
|
|
return ERROR_MORE_DATA;
|
2005-04-27 08:11:52 +00:00
|
|
|
}
|
2005-04-26 14:30:31 +00:00
|
|
|
else
|
|
|
|
strcpyW(szBuffer, package);
|
|
|
|
|
2005-04-27 08:11:52 +00:00
|
|
|
RegCloseKey(hkey);
|
2005-04-26 14:30:31 +00:00
|
|
|
r = ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
else if (strcmpW(szAttribute, szVersionString)==0)
|
|
|
|
{
|
|
|
|
r = MsiOpenProductW(szProduct, &hProduct);
|
|
|
|
if (ERROR_SUCCESS != r)
|
|
|
|
return r;
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-04-26 14:30:31 +00:00
|
|
|
r = MsiGetPropertyW(hProduct, szProductVersion, szBuffer, pcchValueBuf);
|
|
|
|
MsiCloseHandle(hProduct);
|
|
|
|
}
|
|
|
|
else if (strcmpW(szAttribute, szAssignmentType)==0)
|
|
|
|
{
|
2005-06-13 19:04:39 +00:00
|
|
|
FIXME("0 (zero) if advertised or per user , 1(one) if per machine.\n");
|
2005-04-26 14:30:31 +00:00
|
|
|
if (szBuffer)
|
2005-06-13 19:04:39 +00:00
|
|
|
{
|
|
|
|
szBuffer[0] = '1';
|
|
|
|
szBuffer[1] = 0;
|
|
|
|
}
|
2005-06-03 11:24:57 +00:00
|
|
|
if (pcchValueBuf)
|
|
|
|
*pcchValueBuf = 1;
|
2005-04-26 14:30:31 +00:00
|
|
|
r = ERROR_SUCCESS;
|
|
|
|
}
|
2005-06-08 18:35:43 +00:00
|
|
|
else if (strcmpW(szAttribute, szLanguage)==0)
|
|
|
|
{
|
|
|
|
r = MsiOpenProductW(szProduct, &hProduct);
|
|
|
|
if (ERROR_SUCCESS != r)
|
|
|
|
return r;
|
|
|
|
|
|
|
|
r = MsiGetPropertyW(hProduct, szProductLanguage, szBuffer, pcchValueBuf);
|
|
|
|
MsiCloseHandle(hProduct);
|
|
|
|
}
|
2005-04-26 14:30:31 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
r = MsiOpenProductW(szProduct, &hProduct);
|
|
|
|
if (ERROR_SUCCESS != r)
|
|
|
|
return r;
|
|
|
|
|
|
|
|
r = MsiGetPropertyW(hProduct, szAttribute, szBuffer, pcchValueBuf);
|
|
|
|
MsiCloseHandle(hProduct);
|
|
|
|
}
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-25 16:38:26 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2004-07-23 23:28:45 +00:00
|
|
|
UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, DWORD attributes)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2004-04-28 00:29:25 +00:00
|
|
|
LPWSTR szwLogFile = NULL;
|
2005-03-25 16:38:26 +00:00
|
|
|
UINT r;
|
2004-04-28 00:29:25 +00:00
|
|
|
|
2005-03-25 16:38:26 +00:00
|
|
|
TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_a(szLogFile), attributes);
|
2004-04-28 00:29:25 +00:00
|
|
|
|
|
|
|
if( szLogFile )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwLogFile = strdupAtoW( szLogFile );
|
2004-04-28 00:29:25 +00:00
|
|
|
if( !szwLogFile )
|
2005-03-25 16:38:26 +00:00
|
|
|
return ERROR_OUTOFMEMORY;
|
2004-04-28 00:29:25 +00:00
|
|
|
}
|
2005-03-25 16:38:26 +00:00
|
|
|
r = MsiEnableLogW( dwLogMode, szwLogFile, attributes );
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, szwLogFile );
|
2005-03-25 16:38:26 +00:00
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2004-07-23 23:28:45 +00:00
|
|
|
UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, DWORD attributes)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
HANDLE file = INVALID_HANDLE_VALUE;
|
|
|
|
|
2004-07-23 23:28:45 +00:00
|
|
|
TRACE("%08lx %s %08lx\n", dwLogMode, debugstr_w(szLogFile), attributes);
|
2005-01-24 11:22:00 +00:00
|
|
|
|
2005-03-25 16:38:26 +00:00
|
|
|
lstrcpyW(gszLogFile,szLogFile);
|
2004-07-23 23:28:45 +00:00
|
|
|
if (!(attributes & INSTALLLOGATTRIBUTES_APPEND))
|
2004-07-09 19:26:30 +00:00
|
|
|
DeleteFileW(szLogFile);
|
2005-01-24 11:22:00 +00:00
|
|
|
file = CreateFileW(szLogFile, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS,
|
2004-07-09 19:26:30 +00:00
|
|
|
FILE_ATTRIBUTE_NORMAL, NULL);
|
2005-01-24 11:22:00 +00:00
|
|
|
if (file != INVALID_HANDLE_VALUE)
|
|
|
|
CloseHandle(file);
|
2004-07-09 19:26:30 +00:00
|
|
|
else
|
|
|
|
ERR("Unable to enable log %s\n",debugstr_w(szLogFile));
|
|
|
|
|
2004-04-28 00:29:25 +00:00
|
|
|
return ERROR_SUCCESS;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLSTATE WINAPI MsiQueryProductStateA(LPCSTR szProduct)
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
LPWSTR szwProduct = NULL;
|
|
|
|
INSTALLSTATE r;
|
2005-01-17 13:39:57 +00:00
|
|
|
|
2005-03-24 19:04:06 +00:00
|
|
|
if( szProduct )
|
|
|
|
{
|
|
|
|
szwProduct = strdupAtoW( szProduct );
|
|
|
|
if( !szwProduct )
|
|
|
|
return ERROR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
r = MsiQueryProductStateW( szwProduct );
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct );
|
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct)
|
|
|
|
{
|
2005-01-17 13:39:57 +00:00
|
|
|
UINT rc;
|
|
|
|
INSTALLSTATE rrc = INSTALLSTATE_UNKNOWN;
|
2005-03-24 19:04:06 +00:00
|
|
|
HKEY hkey = 0;
|
2005-01-17 13:39:57 +00:00
|
|
|
static const WCHAR szWindowsInstaller[] = {
|
|
|
|
'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0 };
|
|
|
|
DWORD sz;
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(szProduct));
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = MSIREG_OpenUserProductsKey(szProduct,&hkey,FALSE);
|
2005-01-17 13:39:57 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = MSIREG_OpenUninstallKey(szProduct,&hkey,FALSE);
|
2005-01-17 13:39:57 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
sz = sizeof(rrc);
|
2005-01-25 10:58:36 +00:00
|
|
|
rc = RegQueryValueExW(hkey,szWindowsInstaller,NULL,NULL,(LPVOID)&rrc, &sz);
|
2005-01-17 13:39:57 +00:00
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
switch (rrc)
|
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
case 1:
|
|
|
|
/* default */
|
|
|
|
rrc = INSTALLSTATE_DEFAULT;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
FIXME("Unknown install state read from registry (%i)\n",rrc);
|
|
|
|
rrc = INSTALLSTATE_UNKNOWN;
|
|
|
|
break;
|
2005-01-17 13:39:57 +00:00
|
|
|
}
|
|
|
|
end:
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
return rrc;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLUILEVEL WINAPI MsiSetInternalUI(INSTALLUILEVEL dwUILevel, HWND *phWnd)
|
|
|
|
{
|
2004-07-04 00:26:54 +00:00
|
|
|
INSTALLUILEVEL old = gUILevel;
|
|
|
|
HWND oldwnd = gUIhwnd;
|
2005-01-24 11:22:00 +00:00
|
|
|
|
2004-07-04 00:26:54 +00:00
|
|
|
TRACE("%08x %p\n", dwUILevel, phWnd);
|
|
|
|
|
|
|
|
gUILevel = dwUILevel;
|
|
|
|
if (phWnd)
|
|
|
|
{
|
|
|
|
gUIhwnd = *phWnd;
|
|
|
|
*phWnd = oldwnd;
|
|
|
|
}
|
|
|
|
return old;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
INSTALLUI_HANDLERA WINAPI MsiSetExternalUIA(INSTALLUI_HANDLERA puiHandler,
|
2004-06-28 20:34:35 +00:00
|
|
|
DWORD dwMessageFilter, LPVOID pvContext)
|
|
|
|
{
|
2005-01-24 12:55:31 +00:00
|
|
|
INSTALLUI_HANDLERA prev = gUIHandlerA;
|
2004-07-04 00:31:17 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
TRACE("%p %lx %p\n",puiHandler, dwMessageFilter,pvContext);
|
2005-01-24 12:55:31 +00:00
|
|
|
gUIHandlerA = puiHandler;
|
2004-07-04 00:31:17 +00:00
|
|
|
gUIFilter = dwMessageFilter;
|
|
|
|
gUIContext = pvContext;
|
|
|
|
|
|
|
|
return prev;
|
2004-06-28 20:34:35 +00:00
|
|
|
}
|
|
|
|
|
2004-12-23 11:22:00 +00:00
|
|
|
INSTALLUI_HANDLERW WINAPI MsiSetExternalUIW(INSTALLUI_HANDLERW puiHandler,
|
|
|
|
DWORD dwMessageFilter, LPVOID pvContext)
|
|
|
|
{
|
2005-01-03 16:54:43 +00:00
|
|
|
INSTALLUI_HANDLERW prev = gUIHandlerW;
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
TRACE("%p %lx %p\n",puiHandler,dwMessageFilter,pvContext);
|
2005-01-03 16:54:43 +00:00
|
|
|
gUIHandlerW = puiHandler;
|
|
|
|
gUIFilter = dwMessageFilter;
|
|
|
|
gUIContext = pvContext;
|
|
|
|
|
|
|
|
return prev;
|
2004-12-23 11:22:00 +00:00
|
|
|
}
|
|
|
|
|
2005-02-08 12:12:29 +00:00
|
|
|
/******************************************************************
|
|
|
|
* MsiLoadStringW [MSI.@]
|
|
|
|
*
|
|
|
|
* Loads a string from MSI's string resources.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
*
|
|
|
|
* handle [I] only -1 is handled currently
|
|
|
|
* id [I] id of the string to be loaded
|
|
|
|
* lpBuffer [O] buffer for the string to be written to
|
|
|
|
* nBufferMax [I] maximum size of the buffer in characters
|
2005-02-25 14:07:56 +00:00
|
|
|
* lang [I] the preferred language for the string
|
2005-02-08 12:12:29 +00:00
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
*
|
|
|
|
* If successful, this function returns the language id of the string loaded
|
|
|
|
* If the function fails, the function returns zero.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
*
|
|
|
|
* The type of the first parameter is unknown. LoadString's prototype
|
|
|
|
* suggests that it might be a module handle. I have made it an MSI handle
|
|
|
|
* for starters, as -1 is an invalid MSI handle, but not an invalid module
|
|
|
|
* handle. Maybe strings can be stored in an MSI database somehow.
|
|
|
|
*/
|
|
|
|
LANGID WINAPI MsiLoadStringW( MSIHANDLE handle, UINT id, LPWSTR lpBuffer,
|
|
|
|
int nBufferMax, LANGID lang )
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-02-08 12:12:29 +00:00
|
|
|
HRSRC hres;
|
|
|
|
HGLOBAL hResData;
|
|
|
|
LPWSTR p;
|
|
|
|
DWORD i, len;
|
|
|
|
|
|
|
|
TRACE("%ld %u %p %d %d\n", handle, id, lpBuffer, nBufferMax, lang);
|
|
|
|
|
|
|
|
if( handle != -1 )
|
|
|
|
FIXME("don't know how to deal with handle = %08lx\n", handle);
|
|
|
|
|
|
|
|
if( !lang )
|
|
|
|
lang = GetUserDefaultLangID();
|
|
|
|
|
|
|
|
hres = FindResourceExW( msi_hInstance, (LPCWSTR) RT_STRING,
|
|
|
|
(LPWSTR)1, lang );
|
|
|
|
if( !hres )
|
|
|
|
return 0;
|
|
|
|
hResData = LoadResource( msi_hInstance, hres );
|
|
|
|
if( !hResData )
|
|
|
|
return 0;
|
|
|
|
p = LockResource( hResData );
|
|
|
|
if( !p )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
for (i = 0; i < (id&0xf); i++)
|
|
|
|
p += *p + 1;
|
|
|
|
len = *p;
|
|
|
|
|
|
|
|
if( nBufferMax <= len )
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
memcpy( lpBuffer, p+1, len * sizeof(WCHAR));
|
|
|
|
lpBuffer[ len ] = 0;
|
|
|
|
|
|
|
|
TRACE("found -> %s\n", debugstr_w(lpBuffer));
|
|
|
|
|
|
|
|
return lang;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-02-08 12:12:29 +00:00
|
|
|
LANGID WINAPI MsiLoadStringA( MSIHANDLE handle, UINT id, LPSTR lpBuffer,
|
|
|
|
int nBufferMax, LANGID lang )
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-02-08 12:12:29 +00:00
|
|
|
LPWSTR bufW;
|
|
|
|
LANGID r;
|
|
|
|
DWORD len;
|
|
|
|
|
|
|
|
bufW = HeapAlloc(GetProcessHeap(), 0, nBufferMax*sizeof(WCHAR));
|
|
|
|
r = MsiLoadStringW(handle, id, bufW, nBufferMax, lang);
|
|
|
|
if( r )
|
|
|
|
{
|
|
|
|
len = WideCharToMultiByte(CP_ACP, 0, bufW, -1, NULL, 0, NULL, NULL );
|
|
|
|
if( len <= nBufferMax )
|
|
|
|
WideCharToMultiByte( CP_ACP, 0, bufW, -1,
|
|
|
|
lpBuffer, nBufferMax, NULL, NULL );
|
|
|
|
else
|
|
|
|
r = 0;
|
|
|
|
}
|
|
|
|
HeapFree(GetProcessHeap(), 0, bufW);
|
|
|
|
return r;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
INSTALLSTATE WINAPI MsiLocateComponentA(LPCSTR szComponent, LPSTR lpPathBuf,
|
|
|
|
DWORD *pcchBuf)
|
2004-04-12 22:06:12 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %p %08lx\n", debugstr_a(szComponent), lpPathBuf, *pcchBuf);
|
|
|
|
return INSTALLSTATE_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
2005-05-30 11:12:24 +00:00
|
|
|
INSTALLSTATE WINAPI MsiLocateComponentW(LPCWSTR szComponent, LPWSTR lpPathBuf,
|
2005-01-24 11:22:00 +00:00
|
|
|
DWORD *pcchBuf)
|
2004-04-12 22:06:12 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %p %08lx\n", debugstr_w(szComponent), lpPathBuf, *pcchBuf);
|
|
|
|
return INSTALLSTATE_UNKNOWN;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiMessageBoxA(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,
|
|
|
|
WORD wLanguageId, DWORD f)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_a(lpText),debugstr_a(lpCaption),
|
|
|
|
uType,wLanguageId,f);
|
2003-08-13 01:27:48 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiMessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType,
|
|
|
|
WORD wLanguageId, DWORD f)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%p %s %s %u %08x %08lx\n",hWnd,debugstr_w(lpText),debugstr_w(lpCaption),
|
|
|
|
uType,wLanguageId,f);
|
2003-08-13 01:27:48 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiProvideAssemblyA( LPCSTR szAssemblyName, LPCSTR szAppContext,
|
|
|
|
DWORD dwInstallMode, DWORD dwAssemblyInfo, LPSTR lpPathBuf,
|
2005-03-29 11:28:57 +00:00
|
|
|
DWORD* pcchPathBuf )
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %s %08lx %08lx %p %p\n", debugstr_a(szAssemblyName),
|
|
|
|
debugstr_a(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
|
|
|
|
pcchPathBuf);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiProvideAssemblyW( LPCWSTR szAssemblyName, LPCWSTR szAppContext,
|
|
|
|
DWORD dwInstallMode, DWORD dwAssemblyInfo, LPWSTR lpPathBuf,
|
|
|
|
DWORD* pcchPathBuf )
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-03-29 11:28:57 +00:00
|
|
|
FIXME("%s %s %08lx %08lx %p %p\n", debugstr_w(szAssemblyName),
|
2005-01-24 11:22:00 +00:00
|
|
|
debugstr_w(szAppContext), dwInstallMode, dwAssemblyInfo, lpPathBuf,
|
|
|
|
pcchPathBuf);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiProvideComponentFromDescriptorA( LPCSTR szDescriptor,
|
|
|
|
LPSTR szPath, DWORD *pcchPath, DWORD *pcchArgs )
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %p %p %p\n", debugstr_a(szDescriptor), szPath, pcchPath, pcchArgs );
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor,
|
|
|
|
LPWSTR szPath, DWORD *pcchPath, DWORD *pcchArgs )
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
|
|
|
FIXME("%s %p %p %p\n", debugstr_w(szDescriptor), szPath, pcchPath, pcchArgs );
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR szSignedObjectPath,
|
|
|
|
DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
|
|
|
|
DWORD* pcbHashData)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %08lx %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags,
|
|
|
|
ppcCertContext, pbHashData, pcbHashData);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR szSignedObjectPath,
|
|
|
|
DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, BYTE* pbHashData,
|
|
|
|
DWORD* pcbHashData)
|
2003-09-01 23:57:06 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
FIXME("%s %08lx %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags,
|
|
|
|
ppcCertContext, pbHashData, pcbHashData);
|
2003-09-01 23:57:06 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2003-10-30 22:47:42 +00:00
|
|
|
UINT WINAPI MsiGetProductPropertyA( MSIHANDLE hProduct, LPCSTR szProperty,
|
|
|
|
LPSTR szValue, DWORD *pccbValue )
|
|
|
|
{
|
|
|
|
FIXME("%ld %s %p %p\n", hProduct, debugstr_a(szProperty), szValue, pccbValue);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiGetProductPropertyW( MSIHANDLE hProduct, LPCWSTR szProperty,
|
|
|
|
LPWSTR szValue, DWORD *pccbValue )
|
|
|
|
{
|
|
|
|
FIXME("%ld %s %p %p\n", hProduct, debugstr_w(szProperty), szValue, pccbValue);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2003-11-05 01:42:02 +00:00
|
|
|
UINT WINAPI MsiVerifyPackageA( LPCSTR szPackage )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
UINT r;
|
2004-07-09 22:58:27 +00:00
|
|
|
LPWSTR szPack = NULL;
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_a(szPackage) );
|
|
|
|
|
|
|
|
if( szPackage )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szPack = strdupAtoW( szPackage );
|
2004-07-09 22:58:27 +00:00
|
|
|
if( !szPack )
|
|
|
|
return ERROR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
r = MsiVerifyPackageW( szPack );
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, szPack );
|
|
|
|
|
|
|
|
return r;
|
2003-11-05 01:42:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiVerifyPackageW( LPCWSTR szPackage )
|
|
|
|
{
|
2004-07-09 22:58:27 +00:00
|
|
|
MSIHANDLE handle;
|
|
|
|
UINT r;
|
|
|
|
|
|
|
|
TRACE("%s\n", debugstr_w(szPackage) );
|
|
|
|
|
|
|
|
r = MsiOpenDatabaseW( szPackage, MSIDBOPEN_READONLY, &handle );
|
|
|
|
MsiCloseHandle( handle );
|
|
|
|
|
|
|
|
return r;
|
2003-11-05 01:42:02 +00:00
|
|
|
}
|
|
|
|
|
2004-07-09 19:38:40 +00:00
|
|
|
INSTALLSTATE WINAPI MsiGetComponentPathA(LPCSTR szProduct, LPCSTR szComponent,
|
|
|
|
LPSTR lpPathBuf, DWORD* pcchBuf)
|
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
LPWSTR szwProduct = NULL, szwComponent = NULL, lpwPathBuf= NULL;
|
2004-07-09 19:38:40 +00:00
|
|
|
INSTALLSTATE rc;
|
2005-03-24 19:04:06 +00:00
|
|
|
UINT incoming_len;
|
2004-07-09 19:38:40 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( szProduct )
|
2004-07-09 19:38:40 +00:00
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProduct = strdupAtoW( szProduct );
|
2004-07-09 19:38:40 +00:00
|
|
|
if( !szwProduct)
|
|
|
|
return ERROR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( szComponent )
|
2004-07-09 19:38:40 +00:00
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwComponent = strdupAtoW( szComponent );
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !szwComponent )
|
2004-12-10 15:24:52 +00:00
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct);
|
2004-07-09 19:38:40 +00:00
|
|
|
return ERROR_OUTOFMEMORY;
|
2004-12-10 15:24:52 +00:00
|
|
|
}
|
2004-07-09 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( pcchBuf && *pcchBuf > 0 )
|
2005-06-07 20:02:07 +00:00
|
|
|
{
|
2004-07-09 19:38:40 +00:00
|
|
|
lpwPathBuf = HeapAlloc( GetProcessHeap(), 0, *pcchBuf * sizeof(WCHAR));
|
2005-06-07 20:02:07 +00:00
|
|
|
incoming_len = *pcchBuf;
|
|
|
|
}
|
2004-07-09 19:38:40 +00:00
|
|
|
else
|
2005-06-07 20:02:07 +00:00
|
|
|
{
|
2004-07-09 19:38:40 +00:00
|
|
|
lpwPathBuf = NULL;
|
2005-06-07 20:02:07 +00:00
|
|
|
incoming_len = 0;
|
|
|
|
}
|
2004-07-09 19:38:40 +00:00
|
|
|
|
|
|
|
rc = MsiGetComponentPathW(szwProduct, szwComponent, lpwPathBuf, pcchBuf);
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct);
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwComponent);
|
|
|
|
if (lpwPathBuf)
|
|
|
|
{
|
2005-01-17 13:39:57 +00:00
|
|
|
if (rc != INSTALLSTATE_UNKNOWN)
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, incoming_len,
|
2005-01-14 17:05:53 +00:00
|
|
|
lpPathBuf, incoming_len, NULL, NULL);
|
2004-07-09 19:38:40 +00:00
|
|
|
HeapFree( GetProcessHeap(), 0, lpwPathBuf);
|
|
|
|
}
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLSTATE WINAPI MsiGetComponentPathW(LPCWSTR szProduct, LPCWSTR szComponent,
|
|
|
|
LPWSTR lpPathBuf, DWORD* pcchBuf)
|
|
|
|
{
|
2005-01-25 10:58:36 +00:00
|
|
|
WCHAR squished_pc[GUID_SIZE];
|
2005-01-14 17:05:53 +00:00
|
|
|
UINT rc;
|
2005-01-17 13:39:57 +00:00
|
|
|
INSTALLSTATE rrc = INSTALLSTATE_UNKNOWN;
|
2005-02-16 16:04:36 +00:00
|
|
|
HKEY hkey = 0;
|
|
|
|
LPWSTR path = NULL;
|
|
|
|
DWORD sz, type;
|
2005-01-14 17:05:53 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
TRACE("%s %s %p %p\n", debugstr_w(szProduct),
|
2004-07-09 19:38:40 +00:00
|
|
|
debugstr_w(szComponent), lpPathBuf, pcchBuf);
|
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
if( lpPathBuf && !pcchBuf )
|
|
|
|
return INSTALLSTATE_INVALIDARG;
|
|
|
|
|
2005-01-14 17:05:53 +00:00
|
|
|
squash_guid(szProduct,squished_pc);
|
2005-01-17 13:39:57 +00:00
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
rc = MSIREG_OpenProductsKey( szProduct, &hkey, FALSE);
|
|
|
|
if( rc != ERROR_SUCCESS )
|
2005-01-14 17:05:53 +00:00
|
|
|
goto end;
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
RegCloseKey(hkey);
|
2005-01-14 17:05:53 +00:00
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
rc = MSIREG_OpenComponentsKey( szComponent, &hkey, FALSE);
|
|
|
|
if( rc != ERROR_SUCCESS )
|
2005-01-14 17:05:53 +00:00
|
|
|
goto end;
|
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
sz = 0;
|
|
|
|
type = 0;
|
|
|
|
rc = RegQueryValueExW( hkey, squished_pc, NULL, &type, NULL, &sz );
|
|
|
|
if( rc != ERROR_SUCCESS )
|
|
|
|
goto end;
|
|
|
|
if( type != REG_SZ )
|
|
|
|
goto end;
|
2005-01-14 17:05:53 +00:00
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
sz += sizeof(WCHAR);
|
|
|
|
path = HeapAlloc( GetProcessHeap(), 0, sz );
|
|
|
|
if( !path )
|
|
|
|
goto end;
|
|
|
|
|
|
|
|
rc = RegQueryValueExW( hkey, squished_pc, NULL, NULL, (LPVOID) path, &sz );
|
|
|
|
if( rc != ERROR_SUCCESS )
|
2005-01-14 17:05:53 +00:00
|
|
|
goto end;
|
|
|
|
|
2005-01-25 10:58:36 +00:00
|
|
|
TRACE("found path of (%s:%s)(%s)\n", debugstr_w(szComponent),
|
2005-02-16 16:04:36 +00:00
|
|
|
debugstr_w(szProduct), debugstr_w(path));
|
2005-01-14 17:05:53 +00:00
|
|
|
|
2005-02-24 10:05:53 +00:00
|
|
|
if (path[0]=='0')
|
|
|
|
{
|
|
|
|
FIXME("Registry entry.. check entry\n");
|
2005-03-29 11:28:57 +00:00
|
|
|
rrc = INSTALLSTATE_LOCAL;
|
2005-02-24 10:05:53 +00:00
|
|
|
}
|
2005-01-17 13:39:57 +00:00
|
|
|
else
|
2005-02-24 10:05:53 +00:00
|
|
|
{
|
2005-03-02 13:53:50 +00:00
|
|
|
/* PROBABLY a file */
|
2005-02-24 10:05:53 +00:00
|
|
|
if ( GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES )
|
|
|
|
rrc = INSTALLSTATE_LOCAL;
|
|
|
|
else
|
|
|
|
rrc = INSTALLSTATE_ABSENT;
|
|
|
|
}
|
2005-01-14 17:05:53 +00:00
|
|
|
|
2005-02-16 16:04:36 +00:00
|
|
|
if( pcchBuf )
|
|
|
|
{
|
|
|
|
sz = sz / sizeof(WCHAR);
|
|
|
|
if( *pcchBuf >= sz )
|
2005-03-29 11:28:57 +00:00
|
|
|
lstrcpyW( lpPathBuf, path );
|
2005-02-16 16:04:36 +00:00
|
|
|
*pcchBuf = sz;
|
|
|
|
}
|
|
|
|
|
2005-01-14 17:05:53 +00:00
|
|
|
end:
|
2005-02-16 16:04:36 +00:00
|
|
|
HeapFree(GetProcessHeap(), 0, path );
|
2005-01-14 17:05:53 +00:00
|
|
|
RegCloseKey(hkey);
|
|
|
|
return rrc;
|
2004-07-09 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
2005-04-20 15:18:42 +00:00
|
|
|
/******************************************************************
|
|
|
|
* MsiQueryFeatureStateA [MSI.@]
|
|
|
|
*/
|
2004-07-09 19:38:40 +00:00
|
|
|
INSTALLSTATE WINAPI MsiQueryFeatureStateA(LPCSTR szProduct, LPCSTR szFeature)
|
|
|
|
{
|
|
|
|
INSTALLSTATE rc;
|
|
|
|
LPWSTR szwProduct= NULL;
|
|
|
|
LPWSTR szwFeature= NULL;
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( szProduct )
|
2004-07-09 19:38:40 +00:00
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwProduct = strdupAtoW( szProduct );
|
2004-07-09 19:38:40 +00:00
|
|
|
if( !szwProduct)
|
|
|
|
return ERROR_OUTOFMEMORY;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( szFeature )
|
2004-07-09 19:38:40 +00:00
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwFeature = strdupAtoW( szFeature );
|
2004-07-09 19:38:40 +00:00
|
|
|
if( !szwFeature)
|
2004-12-10 15:24:52 +00:00
|
|
|
{
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct);
|
2004-07-09 19:38:40 +00:00
|
|
|
return ERROR_OUTOFMEMORY;
|
2004-12-10 15:24:52 +00:00
|
|
|
}
|
2004-07-09 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
rc = MsiQueryFeatureStateW(szwProduct, szwFeature);
|
|
|
|
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwProduct);
|
|
|
|
HeapFree( GetProcessHeap(), 0, szwFeature);
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2005-04-20 15:18:42 +00:00
|
|
|
/******************************************************************
|
|
|
|
* MsiQueryFeatureStateW [MSI.@]
|
2005-04-28 12:01:06 +00:00
|
|
|
*
|
|
|
|
* This does not verify that the Feature is functional. So i am only going to
|
|
|
|
* check the existence of the key in the registry. This should tell me if it is
|
|
|
|
* installed.
|
2005-04-20 15:18:42 +00:00
|
|
|
*/
|
2004-07-09 19:38:40 +00:00
|
|
|
INSTALLSTATE WINAPI MsiQueryFeatureStateW(LPCWSTR szProduct, LPCWSTR szFeature)
|
|
|
|
{
|
2005-04-28 12:01:06 +00:00
|
|
|
UINT rc;
|
|
|
|
DWORD sz = 0;
|
|
|
|
HKEY hkey;
|
|
|
|
|
|
|
|
TRACE("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
|
|
|
|
|
|
|
|
rc = MSIREG_OpenFeaturesKey(szProduct, &hkey, FALSE);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return INSTALLSTATE_UNKNOWN;
|
|
|
|
|
|
|
|
rc = RegQueryValueExW( hkey, szFeature, NULL, NULL, NULL, &sz);
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
|
|
|
|
if (rc == ERROR_SUCCESS)
|
|
|
|
return INSTALLSTATE_LOCAL;
|
|
|
|
else
|
|
|
|
return INSTALLSTATE_ABSENT;
|
2004-07-09 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
2005-04-20 15:18:42 +00:00
|
|
|
/******************************************************************
|
|
|
|
* MsiGetFileVersionA [MSI.@]
|
|
|
|
*/
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiGetFileVersionA(LPCSTR szFilePath, LPSTR lpVersionBuf,
|
|
|
|
DWORD* pcchVersionBuf, LPSTR lpLangBuf, DWORD* pcchLangBuf)
|
2004-09-06 21:25:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
LPWSTR szwFilePath = NULL, lpwVersionBuff = NULL, lpwLangBuff = NULL;
|
2005-03-24 19:04:06 +00:00
|
|
|
UINT ret = ERROR_OUTOFMEMORY;
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( szFilePath )
|
|
|
|
{
|
2005-03-24 19:04:06 +00:00
|
|
|
szwFilePath = strdupAtoW( szFilePath );
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !szwFilePath )
|
|
|
|
goto end;
|
2004-09-06 21:25:48 +00:00
|
|
|
}
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( lpVersionBuf && pcchVersionBuf && *pcchVersionBuf )
|
|
|
|
{
|
|
|
|
lpwVersionBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf*sizeof(WCHAR));
|
|
|
|
if( !lpwVersionBuff )
|
2004-12-10 15:24:52 +00:00
|
|
|
goto end;
|
2004-09-06 21:25:48 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( lpLangBuf && pcchLangBuf && *pcchLangBuf )
|
|
|
|
{
|
|
|
|
lpwLangBuff = HeapAlloc(GetProcessHeap(), 0, *pcchVersionBuf*sizeof(WCHAR));
|
|
|
|
if( !lpwLangBuff )
|
2004-12-10 15:24:52 +00:00
|
|
|
goto end;
|
2004-09-06 21:25:48 +00:00
|
|
|
}
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
ret = MsiGetFileVersionW(szwFilePath, lpwVersionBuff, pcchVersionBuf,
|
|
|
|
lpwLangBuff, pcchLangBuf);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( lpwVersionBuff )
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, lpwVersionBuff, -1,
|
|
|
|
lpVersionBuf, *pcchVersionBuf, NULL, NULL);
|
|
|
|
if( lpwLangBuff )
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, lpwLangBuff, -1,
|
|
|
|
lpLangBuf, *pcchLangBuf, NULL, NULL);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2004-12-10 15:24:52 +00:00
|
|
|
end:
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree(GetProcessHeap(), 0, szwFilePath);
|
|
|
|
HeapFree(GetProcessHeap(), 0, lpwVersionBuff);
|
|
|
|
HeapFree(GetProcessHeap(), 0, lpwLangBuff);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2004-09-06 21:25:48 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2005-04-20 15:18:42 +00:00
|
|
|
/******************************************************************
|
|
|
|
* MsiGetFileVersionW [MSI.@]
|
|
|
|
*/
|
2005-01-24 11:22:00 +00:00
|
|
|
UINT WINAPI MsiGetFileVersionW(LPCWSTR szFilePath, LPWSTR lpVersionBuf,
|
|
|
|
DWORD* pcchVersionBuf, LPWSTR lpLangBuf, DWORD* pcchLangBuf)
|
2004-09-06 21:25:48 +00:00
|
|
|
{
|
|
|
|
static const WCHAR szVersionResource[] = {'\\',0};
|
2005-01-24 11:22:00 +00:00
|
|
|
static const WCHAR szVersionFormat[] = {
|
|
|
|
'%','d','.','%','d','.','%','d','.','%','d',0};
|
2004-09-06 21:25:48 +00:00
|
|
|
static const WCHAR szLangFormat[] = {'%','d',0};
|
|
|
|
UINT ret = 0;
|
|
|
|
DWORD dwVerLen;
|
|
|
|
LPVOID lpVer = NULL;
|
|
|
|
VS_FIXEDFILEINFO *ffi;
|
|
|
|
UINT puLen;
|
|
|
|
WCHAR tmp[32];
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
TRACE("%s %p %ld %p %ld\n", debugstr_w(szFilePath),
|
2004-09-06 21:25:48 +00:00
|
|
|
lpVersionBuf, pcchVersionBuf?*pcchVersionBuf:0,
|
|
|
|
lpLangBuf, pcchLangBuf?*pcchLangBuf:0);
|
|
|
|
|
|
|
|
dwVerLen = GetFileVersionInfoSizeW(szFilePath, NULL);
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !dwVerLen )
|
2004-09-06 21:25:48 +00:00
|
|
|
return GetLastError();
|
|
|
|
|
|
|
|
lpVer = HeapAlloc(GetProcessHeap(), 0, dwVerLen);
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !lpVer )
|
|
|
|
{
|
2004-09-06 21:25:48 +00:00
|
|
|
ret = ERROR_OUTOFMEMORY;
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( !GetFileVersionInfoW(szFilePath, 0, dwVerLen, lpVer) )
|
|
|
|
{
|
2004-09-06 21:25:48 +00:00
|
|
|
ret = GetLastError();
|
|
|
|
goto end;
|
|
|
|
}
|
2005-01-24 11:22:00 +00:00
|
|
|
if( lpVersionBuf && pcchVersionBuf && *pcchVersionBuf )
|
|
|
|
{
|
|
|
|
if( VerQueryValueW(lpVer, szVersionResource, (LPVOID*)&ffi, &puLen) &&
|
|
|
|
(puLen > 0) )
|
|
|
|
{
|
|
|
|
wsprintfW(tmp, szVersionFormat,
|
|
|
|
HIWORD(ffi->dwFileVersionMS), LOWORD(ffi->dwFileVersionMS),
|
|
|
|
HIWORD(ffi->dwFileVersionLS), LOWORD(ffi->dwFileVersionLS));
|
2004-09-06 21:25:48 +00:00
|
|
|
lstrcpynW(lpVersionBuf, tmp, *pcchVersionBuf);
|
2005-03-29 11:28:57 +00:00
|
|
|
*pcchVersionBuf = lstrlenW(lpVersionBuf);
|
2004-09-06 21:25:48 +00:00
|
|
|
}
|
2005-01-24 11:22:00 +00:00
|
|
|
else
|
|
|
|
{
|
2004-09-06 21:25:48 +00:00
|
|
|
*lpVersionBuf = 0;
|
|
|
|
*pcchVersionBuf = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if( lpLangBuf && pcchLangBuf && *pcchLangBuf )
|
|
|
|
{
|
2004-09-06 21:25:48 +00:00
|
|
|
DWORD lang = GetUserDefaultLangID();
|
2005-01-24 11:22:00 +00:00
|
|
|
|
2004-09-06 21:25:48 +00:00
|
|
|
FIXME("Retrieve language from file\n");
|
|
|
|
wsprintfW(tmp, szLangFormat, lang);
|
|
|
|
lstrcpynW(lpLangBuf, tmp, *pcchLangBuf);
|
2005-03-29 11:28:57 +00:00
|
|
|
*pcchLangBuf = lstrlenW(lpLangBuf);
|
2004-09-06 21:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
end:
|
2005-01-20 10:36:35 +00:00
|
|
|
HeapFree(GetProcessHeap(), 0, lpVer);
|
2004-09-06 21:25:48 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2004-07-09 19:38:40 +00:00
|
|
|
|
2004-03-30 20:42:06 +00:00
|
|
|
/******************************************************************
|
2005-01-24 11:22:00 +00:00
|
|
|
* DllMain
|
2004-03-30 20:42:06 +00:00
|
|
|
*/
|
2005-01-24 11:22:00 +00:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
switch(fdwReason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2005-02-08 12:12:29 +00:00
|
|
|
msi_hInstance = hinstDLL;
|
2005-01-24 11:22:00 +00:00
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
2005-01-28 12:39:57 +00:00
|
|
|
msi_dialog_register_class();
|
2005-01-24 11:22:00 +00:00
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
2005-01-28 12:39:57 +00:00
|
|
|
msi_dialog_unregister_class();
|
2005-01-24 11:22:00 +00:00
|
|
|
/* FIXME: Cleanup */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct tagIClassFactoryImpl
|
|
|
|
{
|
2005-06-01 19:57:42 +00:00
|
|
|
const IClassFactoryVtbl *lpVtbl;
|
2004-03-30 20:42:06 +00:00
|
|
|
} IClassFactoryImpl;
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static HRESULT WINAPI MsiCF_QueryInterface(LPCLASSFACTORY iface,
|
|
|
|
REFIID riid,LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
|
|
|
FIXME("%p %s %p\n",This,debugstr_guid(riid),ppobj);
|
|
|
|
return E_NOINTERFACE;
|
2004-03-30 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static ULONG WINAPI MsiCF_AddRef(LPCLASSFACTORY iface)
|
|
|
|
{
|
|
|
|
return 2;
|
2004-03-30 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static ULONG WINAPI MsiCF_Release(LPCLASSFACTORY iface)
|
|
|
|
{
|
|
|
|
return 1;
|
2004-03-30 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static HRESULT WINAPI MsiCF_CreateInstance(LPCLASSFACTORY iface,
|
|
|
|
LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
|
|
|
|
{
|
|
|
|
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
|
|
|
|
|
|
|
FIXME("%p %p %s %p\n", This, pOuter, debugstr_guid(riid), ppobj);
|
|
|
|
return E_FAIL;
|
2004-03-30 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static HRESULT WINAPI MsiCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
|
|
|
|
{
|
|
|
|
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
|
|
|
|
|
|
|
FIXME("%p %d\n", This, dolock);
|
|
|
|
return S_OK;
|
2004-03-30 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2005-06-01 19:57:42 +00:00
|
|
|
static const IClassFactoryVtbl MsiCF_Vtbl =
|
2005-01-24 11:22:00 +00:00
|
|
|
{
|
|
|
|
MsiCF_QueryInterface,
|
|
|
|
MsiCF_AddRef,
|
|
|
|
MsiCF_Release,
|
|
|
|
MsiCF_CreateInstance,
|
|
|
|
MsiCF_LockServer
|
2004-03-30 20:42:06 +00:00
|
|
|
};
|
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
static IClassFactoryImpl Msi_CF = { &MsiCF_Vtbl };
|
2004-03-30 20:42:06 +00:00
|
|
|
|
2004-05-17 21:08:31 +00:00
|
|
|
/******************************************************************
|
2005-04-20 15:18:42 +00:00
|
|
|
* DllGetClassObject [MSI.@]
|
2004-05-17 21:08:31 +00:00
|
|
|
*/
|
2005-01-24 11:22:00 +00:00
|
|
|
HRESULT WINAPI MSI_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
|
|
|
{
|
|
|
|
TRACE("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
|
|
|
|
|
|
|
if( IsEqualCLSID (rclsid, &CLSID_IMsiServer) ||
|
|
|
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerMessage) ||
|
|
|
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerX1) ||
|
|
|
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerX2) ||
|
|
|
|
IsEqualCLSID (rclsid, &CLSID_IMsiServerX3) )
|
|
|
|
{
|
|
|
|
*ppv = (LPVOID) &Msi_CF;
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
|
|
|
|
2004-05-17 21:08:31 +00:00
|
|
|
/******************************************************************
|
2005-04-20 15:18:42 +00:00
|
|
|
* DllGetVersion [MSI.@]
|
2004-05-17 21:08:31 +00:00
|
|
|
*/
|
2004-03-30 20:42:06 +00:00
|
|
|
HRESULT WINAPI MSI_DllGetVersion(DLLVERSIONINFO *pdvi)
|
2003-08-13 01:27:48 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
TRACE("%p\n",pdvi);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
|
|
|
|
return E_INVALIDARG;
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
pdvi->dwMajorVersion = MSI_MAJORVERSION;
|
|
|
|
pdvi->dwMinorVersion = MSI_MINORVERSION;
|
|
|
|
pdvi->dwBuildNumber = MSI_BUILDNUMBER;
|
|
|
|
pdvi->dwPlatformID = 1;
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-01-24 11:22:00 +00:00
|
|
|
return S_OK;
|
2003-08-13 01:27:48 +00:00
|
|
|
}
|
2004-02-17 21:05:44 +00:00
|
|
|
|
2004-05-17 21:08:31 +00:00
|
|
|
/******************************************************************
|
2005-04-20 15:18:42 +00:00
|
|
|
* DllCanUnloadNow [MSI.@]
|
2004-05-17 21:08:31 +00:00
|
|
|
*/
|
2004-03-30 20:42:06 +00:00
|
|
|
BOOL WINAPI MSI_DllCanUnloadNow(void)
|
2004-02-17 21:05:44 +00:00
|
|
|
{
|
2005-01-24 11:22:00 +00:00
|
|
|
return S_FALSE;
|
2004-02-17 21:05:44 +00:00
|
|
|
}
|
2004-06-28 20:34:35 +00:00
|
|
|
|
2005-01-03 16:54:43 +00:00
|
|
|
UINT WINAPI MsiGetFeatureUsageW(LPCWSTR szProduct, LPCWSTR szFeature,
|
|
|
|
DWORD* pdwUseCount, WORD* pwDateUsed)
|
|
|
|
{
|
|
|
|
FIXME("%s %s %p %p\n",debugstr_w(szProduct), debugstr_w(szFeature),
|
|
|
|
pdwUseCount, pwDateUsed);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiGetFeatureUsageA(LPCSTR szProduct, LPCSTR szFeature,
|
|
|
|
DWORD* pdwUseCount, WORD* pwDateUsed)
|
|
|
|
{
|
|
|
|
FIXME("%s %s %p %p\n", debugstr_a(szProduct), debugstr_a(szFeature),
|
|
|
|
pdwUseCount, pwDateUsed);
|
2004-06-29 04:04:13 +00:00
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
INSTALLSTATE WINAPI MsiUseFeatureExW(LPCWSTR szProduct, LPCWSTR szFeature,
|
2005-01-19 16:58:03 +00:00
|
|
|
DWORD dwInstallMode, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
FIXME("%s %s %li %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
|
|
|
|
dwInstallMode, dwReserved);
|
2005-02-16 16:24:38 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Polls all the components of the feature to find install state and then
|
|
|
|
* writes:
|
|
|
|
* Software\\Microsoft\\Windows\\CurrentVersion\\
|
|
|
|
* Installer\\Products\\<squishguid>\\<feature>
|
|
|
|
* "Usage"=dword:........
|
2005-03-29 11:28:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
return INSTALLSTATE_LOCAL;
|
2005-02-16 16:24:38 +00:00
|
|
|
}
|
|
|
|
|
2005-04-20 15:18:42 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* MsiUseFeatureExA [MSI.@]
|
|
|
|
*/
|
2005-03-29 11:28:57 +00:00
|
|
|
INSTALLSTATE WINAPI MsiUseFeatureExA(LPCSTR szProduct, LPCSTR szFeature,
|
2005-02-16 16:24:38 +00:00
|
|
|
DWORD dwInstallMode, DWORD dwReserved)
|
|
|
|
{
|
|
|
|
FIXME("%s %s %li %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
|
|
|
|
dwInstallMode, dwReserved);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
|
|
|
return INSTALLSTATE_LOCAL;
|
2005-02-16 16:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLSTATE WINAPI MsiUseFeatureW(LPCWSTR szProduct, LPCWSTR szFeature)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", debugstr_w(szProduct), debugstr_w(szFeature));
|
2005-03-29 11:28:57 +00:00
|
|
|
|
|
|
|
return INSTALLSTATE_LOCAL;
|
2005-02-16 16:24:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTALLSTATE WINAPI MsiUseFeatureA(LPCSTR szProduct, LPCSTR szFeature)
|
|
|
|
{
|
|
|
|
FIXME("%s %s\n", debugstr_a(szProduct), debugstr_a(szFeature));
|
2005-03-29 11:28:57 +00:00
|
|
|
|
|
|
|
return INSTALLSTATE_LOCAL;
|
2005-01-19 16:58:03 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT WINAPI MsiProvideQualifiedComponentExW(LPCWSTR szComponent,
|
2005-01-24 11:22:00 +00:00
|
|
|
LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR szProduct,
|
2005-03-29 11:28:57 +00:00
|
|
|
DWORD Unused1, DWORD Unused2, LPWSTR lpPathBuf,
|
2005-01-24 11:22:00 +00:00
|
|
|
DWORD* pcchPathBuf)
|
2005-01-19 16:58:03 +00:00
|
|
|
{
|
2005-04-20 12:50:05 +00:00
|
|
|
HKEY hkey;
|
|
|
|
UINT rc;
|
|
|
|
LPWSTR info;
|
|
|
|
DWORD sz;
|
|
|
|
LPWSTR product = NULL;
|
|
|
|
LPWSTR component = NULL;
|
|
|
|
LPWSTR ptr;
|
|
|
|
GUID clsid;
|
|
|
|
|
|
|
|
TRACE("%s %s %li %s %li %li %p %p\n", debugstr_w(szComponent),
|
2005-01-24 11:22:00 +00:00
|
|
|
debugstr_w(szQualifier), dwInstallMode, debugstr_w(szProduct),
|
|
|
|
Unused1, Unused2, lpPathBuf, pcchPathBuf);
|
2005-04-20 12:50:05 +00:00
|
|
|
|
|
|
|
rc = MSIREG_OpenUserComponentsKey(szComponent, &hkey, FALSE);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return ERROR_INDEX_ABSENT;
|
|
|
|
|
|
|
|
sz = 0;
|
|
|
|
rc = RegQueryValueExW( hkey, szQualifier, NULL, NULL, NULL, &sz);
|
|
|
|
if (sz <= 0)
|
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
return ERROR_INDEX_ABSENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
info = HeapAlloc(GetProcessHeap(),0,sz);
|
|
|
|
rc = RegQueryValueExW( hkey, szQualifier, NULL, NULL, (LPBYTE)info, &sz);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
HeapFree(GetProcessHeap(),0,info);
|
|
|
|
return ERROR_INDEX_ABSENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* find the component */
|
2005-04-28 18:28:11 +00:00
|
|
|
ptr = strchrW(&info[20],'>');
|
2005-04-20 12:50:05 +00:00
|
|
|
if (ptr)
|
|
|
|
ptr++;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
HeapFree(GetProcessHeap(),0,info);
|
|
|
|
return ERROR_INDEX_ABSENT;
|
|
|
|
}
|
2005-01-19 16:58:03 +00:00
|
|
|
|
2005-04-20 12:50:05 +00:00
|
|
|
if (!szProduct)
|
|
|
|
{
|
|
|
|
decode_base85_guid(info,&clsid);
|
|
|
|
StringFromCLSID(&clsid, &product);
|
|
|
|
}
|
|
|
|
decode_base85_guid(ptr,&clsid);
|
|
|
|
StringFromCLSID(&clsid, &component);
|
|
|
|
|
|
|
|
if (!szProduct)
|
|
|
|
rc = MsiGetComponentPathW(product, component, lpPathBuf, pcchPathBuf);
|
|
|
|
else
|
|
|
|
rc = MsiGetComponentPathW(szProduct, component, lpPathBuf, pcchPathBuf);
|
|
|
|
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
HeapFree(GetProcessHeap(),0,info);
|
|
|
|
HeapFree(GetProcessHeap(),0,product);
|
|
|
|
HeapFree(GetProcessHeap(),0,component);
|
2005-04-21 17:24:27 +00:00
|
|
|
|
|
|
|
if (rc == INSTALLSTATE_LOCAL)
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
else
|
|
|
|
return ERROR_FILE_NOT_FOUND;
|
2005-04-20 12:50:05 +00:00
|
|
|
}
|
|
|
|
|
2005-04-22 19:04:41 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* MsiProvideQualifiedComponentW [MSI.@]
|
|
|
|
*/
|
2005-04-20 12:50:05 +00:00
|
|
|
UINT WINAPI MsiProvideQualifiedComponentW( LPCWSTR szComponent,
|
|
|
|
LPCWSTR szQualifier, DWORD dwInstallMode, LPWSTR lpPathBuf,
|
|
|
|
DWORD* pcchPathBuf)
|
|
|
|
{
|
|
|
|
return MsiProvideQualifiedComponentExW(szComponent, szQualifier,
|
|
|
|
dwInstallMode, NULL, 0, 0, lpPathBuf, pcchPathBuf);
|
|
|
|
}
|
|
|
|
|
2005-04-22 19:04:41 +00:00
|
|
|
/***********************************************************************
|
|
|
|
* MsiProvideQualifiedComponentA [MSI.@]
|
|
|
|
*/
|
2005-04-20 12:50:05 +00:00
|
|
|
UINT WINAPI MsiProvideQualifiedComponentA( LPCSTR szComponent,
|
|
|
|
LPCSTR szQualifier, DWORD dwInstallMode, LPSTR lpPathBuf,
|
|
|
|
DWORD* pcchPathBuf)
|
|
|
|
{
|
|
|
|
LPWSTR szwComponent, szwQualifier, lpwPathBuf;
|
|
|
|
DWORD pcchwPathBuf;
|
|
|
|
UINT rc;
|
|
|
|
|
|
|
|
TRACE("%s %s %li %p %p\n",szComponent, szQualifier,
|
|
|
|
dwInstallMode, lpPathBuf, pcchPathBuf);
|
|
|
|
|
|
|
|
szwComponent= strdupAtoW( szComponent);
|
|
|
|
szwQualifier= strdupAtoW( szQualifier);
|
|
|
|
|
|
|
|
lpwPathBuf = HeapAlloc(GetProcessHeap(),0,*pcchPathBuf * sizeof(WCHAR));
|
|
|
|
|
|
|
|
pcchwPathBuf = *pcchPathBuf;
|
|
|
|
|
|
|
|
rc = MsiProvideQualifiedComponentW(szwComponent, szwQualifier,
|
|
|
|
dwInstallMode, lpwPathBuf, &pcchwPathBuf);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(),0,szwComponent);
|
|
|
|
HeapFree(GetProcessHeap(),0,szwQualifier);
|
|
|
|
*pcchPathBuf = WideCharToMultiByte(CP_ACP, 0, lpwPathBuf, pcchwPathBuf,
|
|
|
|
lpPathBuf, *pcchPathBuf, NULL, NULL);
|
|
|
|
|
|
|
|
HeapFree(GetProcessHeap(),0,lpwPathBuf);
|
|
|
|
return rc;
|
2005-01-19 16:58:03 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
USERINFOSTATE WINAPI MsiGetUserInfoW(LPCWSTR szProduct, LPWSTR lpUserNameBuf,
|
|
|
|
DWORD* pcchUserNameBuf, LPWSTR lpOrgNameBuf,
|
2005-01-19 16:58:03 +00:00
|
|
|
DWORD* pcchOrgNameBuf, LPWSTR lpSerialBuf, DWORD* pcchSerialBuf)
|
|
|
|
{
|
2005-05-20 18:59:11 +00:00
|
|
|
HKEY hkey;
|
|
|
|
DWORD sz;
|
|
|
|
UINT rc = ERROR_SUCCESS,rc2 = ERROR_SUCCESS;
|
|
|
|
static const WCHAR szOwner[] = {'R','e','g','O','w','n','e','r',0};
|
|
|
|
static const WCHAR szCompany[] = {'R','e','g','C','o','m','p','a','n','y',0};
|
|
|
|
static const WCHAR szSerial[] = {'P','r','o','d','u','c','t','I','D',0};
|
|
|
|
|
|
|
|
TRACE("%s %p %p %p %p %p %p\n",debugstr_w(szProduct), lpUserNameBuf,
|
2005-02-10 18:57:42 +00:00
|
|
|
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
|
|
|
pcchSerialBuf);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
2005-05-20 18:59:11 +00:00
|
|
|
rc = MSIREG_OpenUninstallKey(szProduct, &hkey, FALSE);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return USERINFOSTATE_UNKNOWN;
|
|
|
|
|
|
|
|
if (lpUserNameBuf)
|
|
|
|
{
|
|
|
|
sz = *lpUserNameBuf * sizeof(WCHAR);
|
|
|
|
rc = RegQueryValueExW( hkey, szOwner, NULL, NULL, (LPBYTE)lpUserNameBuf,
|
|
|
|
&sz);
|
|
|
|
}
|
|
|
|
if (!lpUserNameBuf && pcchUserNameBuf)
|
|
|
|
{
|
|
|
|
sz = 0;
|
|
|
|
rc = RegQueryValueExW( hkey, szOwner, NULL, NULL, NULL, &sz);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pcchUserNameBuf)
|
|
|
|
*pcchUserNameBuf = sz / sizeof(WCHAR);
|
|
|
|
|
|
|
|
if (lpOrgNameBuf)
|
|
|
|
{
|
|
|
|
sz = *pcchOrgNameBuf * sizeof(WCHAR);
|
|
|
|
rc2 = RegQueryValueExW( hkey, szCompany, NULL, NULL,
|
|
|
|
(LPBYTE)lpOrgNameBuf, &sz);
|
|
|
|
}
|
|
|
|
if (!lpOrgNameBuf && pcchOrgNameBuf)
|
|
|
|
{
|
|
|
|
sz = 0;
|
|
|
|
rc2 = RegQueryValueExW( hkey, szCompany, NULL, NULL, NULL, &sz);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pcchOrgNameBuf)
|
|
|
|
*pcchOrgNameBuf = sz / sizeof(WCHAR);
|
|
|
|
|
|
|
|
if (rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA &&
|
|
|
|
rc2 != ERROR_SUCCESS && rc2 != ERROR_MORE_DATA)
|
|
|
|
{
|
|
|
|
RegCloseKey(hkey);
|
|
|
|
return USERINFOSTATE_ABSENT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (lpSerialBuf)
|
|
|
|
{
|
|
|
|
sz = *pcchSerialBuf * sizeof(WCHAR);
|
|
|
|
RegQueryValueExW( hkey, szSerial, NULL, NULL, (LPBYTE)lpSerialBuf,
|
|
|
|
&sz);
|
|
|
|
}
|
|
|
|
if (!lpSerialBuf && pcchSerialBuf)
|
|
|
|
{
|
|
|
|
sz = 0;
|
|
|
|
rc = RegQueryValueExW( hkey, szSerial, NULL, NULL, NULL, &sz);
|
|
|
|
}
|
|
|
|
if (pcchSerialBuf)
|
|
|
|
*pcchSerialBuf = sz / sizeof(WCHAR);
|
|
|
|
|
2005-05-23 16:23:54 +00:00
|
|
|
RegCloseKey(hkey);
|
2005-05-20 18:59:11 +00:00
|
|
|
return USERINFOSTATE_PRESENT;
|
2005-02-10 18:57:42 +00:00
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
USERINFOSTATE WINAPI MsiGetUserInfoA(LPCSTR szProduct, LPSTR lpUserNameBuf,
|
|
|
|
DWORD* pcchUserNameBuf, LPSTR lpOrgNameBuf,
|
2005-02-10 18:57:42 +00:00
|
|
|
DWORD* pcchOrgNameBuf, LPSTR lpSerialBuf, DWORD* pcchSerialBuf)
|
|
|
|
{
|
|
|
|
FIXME("%s %p %p %p %p %p %p\n",debugstr_a(szProduct), lpUserNameBuf,
|
2005-01-24 11:22:00 +00:00
|
|
|
pcchUserNameBuf, lpOrgNameBuf, pcchOrgNameBuf, lpSerialBuf,
|
|
|
|
pcchSerialBuf);
|
2005-03-29 11:28:57 +00:00
|
|
|
|
|
|
|
return USERINFOSTATE_UNKNOWN;
|
2005-01-19 16:58:03 +00:00
|
|
|
}
|
|
|
|
|
2005-01-26 19:41:13 +00:00
|
|
|
UINT WINAPI MsiCollectUserInfoW(LPCWSTR szProduct)
|
2005-01-19 16:58:03 +00:00
|
|
|
{
|
2005-05-20 18:59:11 +00:00
|
|
|
MSIHANDLE handle;
|
|
|
|
UINT rc;
|
2005-05-23 16:23:54 +00:00
|
|
|
MSIPACKAGE *package;
|
2005-05-20 18:59:11 +00:00
|
|
|
static const WCHAR szFirstRun[] = {'F','i','r','s','t','R','u','n',0};
|
|
|
|
|
|
|
|
TRACE("(%s)\n",debugstr_w(szProduct));
|
|
|
|
|
|
|
|
rc = MsiOpenProductW(szProduct,&handle);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return ERROR_INVALID_PARAMETER;
|
|
|
|
|
2005-05-23 16:23:54 +00:00
|
|
|
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
|
|
|
|
rc = ACTION_PerformUIAction(package, szFirstRun);
|
|
|
|
msiobj_release( &package->hdr );
|
|
|
|
|
2005-05-20 18:59:11 +00:00
|
|
|
MsiCloseHandle(handle);
|
|
|
|
|
|
|
|
return rc;
|
2005-01-26 19:41:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiCollectUserInfoA(LPCSTR szProduct)
|
|
|
|
{
|
2005-05-20 18:59:11 +00:00
|
|
|
MSIHANDLE handle;
|
|
|
|
UINT rc;
|
2005-05-23 16:23:54 +00:00
|
|
|
MSIPACKAGE *package;
|
2005-05-20 18:59:11 +00:00
|
|
|
static const WCHAR szFirstRun[] = {'F','i','r','s','t','R','u','n',0};
|
|
|
|
|
|
|
|
TRACE("(%s)\n",debugstr_a(szProduct));
|
|
|
|
|
|
|
|
rc = MsiOpenProductA(szProduct,&handle);
|
|
|
|
if (rc != ERROR_SUCCESS)
|
|
|
|
return ERROR_INVALID_PARAMETER;
|
|
|
|
|
2005-05-23 16:23:54 +00:00
|
|
|
package = msihandle2msiinfo(handle, MSIHANDLETYPE_PACKAGE);
|
|
|
|
rc = ACTION_PerformUIAction(package, szFirstRun);
|
|
|
|
msiobj_release( &package->hdr );
|
|
|
|
|
2005-05-20 18:59:11 +00:00
|
|
|
MsiCloseHandle(handle);
|
|
|
|
|
|
|
|
return rc;
|
2005-01-26 19:41:13 +00:00
|
|
|
}
|
|
|
|
|
2005-03-23 10:24:53 +00:00
|
|
|
UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved)
|
2005-01-26 19:41:13 +00:00
|
|
|
{
|
2005-05-11 12:01:12 +00:00
|
|
|
WCHAR path[MAX_PATH];
|
|
|
|
|
|
|
|
if(dwReserved) {
|
|
|
|
FIXME("Don't know how to handle argument %ld\n", dwReserved);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!GetWindowsDirectoryW(path, MAX_PATH)) {
|
|
|
|
FIXME("GetWindowsDirectory failed unexpected! Error %ld\n",
|
|
|
|
GetLastError());
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
strcatW(path, installerW);
|
|
|
|
|
|
|
|
CreateDirectoryW(path, NULL);
|
|
|
|
|
|
|
|
return 0;
|
2005-01-19 16:58:03 +00:00
|
|
|
}
|
2005-02-10 17:10:14 +00:00
|
|
|
|
|
|
|
UINT WINAPI MsiGetShortcutTargetA( LPCSTR szShortcutTarget,
|
2005-02-16 16:24:38 +00:00
|
|
|
LPSTR szProductCode, LPSTR szFeatureId,
|
|
|
|
LPSTR szComponentCode )
|
2005-02-10 17:10:14 +00:00
|
|
|
{
|
|
|
|
FIXME("\n");
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget,
|
2005-02-16 16:24:38 +00:00
|
|
|
LPWSTR szProductCode, LPWSTR szFeatureId,
|
|
|
|
LPWSTR szComponentCode )
|
2005-02-10 17:10:14 +00:00
|
|
|
{
|
|
|
|
FIXME("\n");
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
2005-02-16 16:24:38 +00:00
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT WINAPI MsiReinstallFeatureW( LPCWSTR szProduct, LPCWSTR szFeature,
|
2005-02-16 16:24:38 +00:00
|
|
|
DWORD dwReinstallMode )
|
|
|
|
{
|
|
|
|
FIXME("%s %s %li\n", debugstr_w(szProduct), debugstr_w(szFeature),
|
|
|
|
dwReinstallMode);
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2005-03-29 11:28:57 +00:00
|
|
|
UINT WINAPI MsiReinstallFeatureA( LPCSTR szProduct, LPCSTR szFeature,
|
2005-02-16 16:24:38 +00:00
|
|
|
DWORD dwReinstallMode )
|
|
|
|
{
|
|
|
|
FIXME("%s %s %li\n", debugstr_a(szProduct), debugstr_a(szFeature),
|
|
|
|
dwReinstallMode);
|
|
|
|
return ERROR_SUCCESS;
|
|
|
|
}
|