mirror of
https://git.openafs.org/openafs.git
synced 2025-01-20 16:00:12 +00:00
wix-msi-loopback-20040622
convert wix installer to use msi interface to loopback dll instead of instloop.exe
This commit is contained in:
parent
be70343e2a
commit
50e18fe024
@ -16,7 +16,8 @@ DLLEXPORTS=\
|
||||
-EXPORT:InstallLoopBack \
|
||||
-EXPORT:doLoopBackEntryW \
|
||||
-EXPORT:uninstallLoopBackEntryW \
|
||||
-EXPORT:installLoopbackMSI
|
||||
-EXPORT:installLoopbackMSI \
|
||||
-EXPORT:uninstallLoopbackMSI
|
||||
|
||||
DLLLIBFILES=\
|
||||
setupapi.lib msi.lib uuid.lib Shell32.lib ole32.lib advapi32.lib wbemuuid.lib
|
||||
|
@ -627,3 +627,36 @@ UINT __stdcall installLoopbackMSI (MSIHANDLE hInstall)
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT __stdcall uninstallLoopbackMSI (MSIHANDLE hInstall)
|
||||
{
|
||||
LPWSTR szValueBuf;
|
||||
DWORD cbValueBuf = 256;
|
||||
Args args;
|
||||
UINT rc;
|
||||
|
||||
szValueBuf = (LPWSTR) malloc (cbValueBuf * sizeof (WCHAR));
|
||||
while (rc = MsiGetPropertyW(hInstall, L"CustomActionData", szValueBuf, &cbValueBuf)) {
|
||||
free (szValueBuf);
|
||||
if (rc == ERROR_MORE_DATA) {
|
||||
cbValueBuf++;
|
||||
szValueBuf = (LPWSTR) malloc (cbValueBuf * sizeof (WCHAR));
|
||||
}
|
||||
else
|
||||
return ERROR_INSTALL_FAILURE;
|
||||
}
|
||||
|
||||
if (!process_args(szValueBuf, args))
|
||||
return ERROR_INSTALL_FAILURE;
|
||||
|
||||
rc = UnInstallLoopBack ();
|
||||
|
||||
if (rc == 1)
|
||||
return ERROR_INSTALL_FAILURE;
|
||||
|
||||
if (rc == 2) {
|
||||
MsiDoActionW (hInstall, L"ScheduleReboot");
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user