summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/windows/installer/wix/custom/custom.cpp29
-rw-r--r--src/windows/installer/wix/custom/custom.h1
-rw-r--r--src/windows/installer/wix/lang/ui_1033.wxi1
-rw-r--r--src/windows/installer/wix/property.wxi2
4 files changed, 24 insertions, 9 deletions
diff --git a/src/windows/installer/wix/custom/custom.cpp b/src/windows/installer/wix/custom/custom.cpp
index a61b632ac1..98d669f3ef 100644
--- a/src/windows/installer/wix/custom/custom.cpp
+++ b/src/windows/installer/wix/custom/custom.cpp
@@ -551,7 +551,7 @@ MSIDLLEXPORT UninstallNsisInstallation( MSIHANDLE hInstall )
sInfo.cb = sizeof(sInfo);
sInfo.lpReserved = NULL;
sInfo.lpDesktop = _T("");
- sInfo.lpTitle = _T("Foo");
+ sInfo.lpTitle = _T("NSIS Uninstaller for Kerberos for Windows");
sInfo.dwX = 0;
sInfo.dwY = 0;
sInfo.dwXSize = 0;
@@ -578,11 +578,24 @@ MSIDLLEXPORT UninstallNsisInstallation( MSIHANDLE hInstall )
NULL,
&sInfo,
&pInfo)) {
- pInfo.hProcess = NULL;
- pInfo.hThread = NULL;
- rv = 40;
- goto _cleanup;
- };
+ DWORD lastError = GetLastError();
+ MSIHANDLE hRecord;
+
+ hRecord = MsiCreateRecord(4);
+ MsiRecordClearData(hRecord);
+ MsiRecordSetInteger(hRecord, 1, ERR_NSS_FAILED_CP);
+ MsiRecordSetString(hRecord, 2, strPathUninst);
+ MsiRecordSetInteger(hRecord, 3, lastError);
+
+ MsiProcessMessage( hInstall, INSTALLMESSAGE_ERROR, hRecord );
+
+ MsiCloseHandle( hRecord );
+
+ pInfo.hProcess = NULL;
+ pInfo.hThread = NULL;
+ rv = 40;
+ goto _cleanup;
+ };
// Create a job object to contain the NSIS uninstall process tree
@@ -630,8 +643,8 @@ _cleanup:
if(hJob) CloseHandle(hJob);
if(strPathUninst) delete strPathUninst;
- if(rv != ERROR_SUCCESS) {
- ShowMsiError( hInstall, ERR_NSS_FAILED, rv );
+ if(rv != ERROR_SUCCESS && rv != 40) {
+ ShowMsiError( hInstall, ERR_NSS_FAILED, rv );
}
return rv;
}
diff --git a/src/windows/installer/wix/custom/custom.h b/src/windows/installer/wix/custom/custom.h
index 2e66671a1a..3b28eeccae 100644
--- a/src/windows/installer/wix/custom/custom.h
+++ b/src/windows/installer/wix/custom/custom.h
@@ -79,3 +79,4 @@ MSIDLLEXPORT UninstallNetProvider ( MSIHANDLE );
#define ERR_ABORT 4004
#define ERR_PROC_LIST 4006
#define ERR_NPI_FAILED 4007
+#define ERR_NSS_FAILED_CP 4008
diff --git a/src/windows/installer/wix/lang/ui_1033.wxi b/src/windows/installer/wix/lang/ui_1033.wxi
index bae7781750..dc6b5561f7 100644
--- a/src/windows/installer/wix/lang/ui_1033.wxi
+++ b/src/windows/installer/wix/lang/ui_1033.wxi
@@ -1165,6 +1165,7 @@
<Error Id="4005">Custom action failed. Phase [2]</Error>
<Error Id="4006">Failed to determine running processes. Status [2]</Error>
<Error Id="4007">Failed to install Kerberos network provider. Status [2]</Error>
+ <Error Id="4008">NSIS Uninstallation failed to initialize. Uninstaller path [2] returned error [3]</Error>
<AdminUISequence>
<Show Dialog="FatalError" OnExit="error" />
<Show Dialog="UserExit" OnExit="cancel" />
diff --git a/src/windows/installer/wix/property.wxi b/src/windows/installer/wix/property.wxi
index b392333fc7..b1f5c599bd 100644
--- a/src/windows/installer/wix/property.wxi
+++ b/src/windows/installer/wix/property.wxi
@@ -40,7 +40,7 @@
<Property Id="ComponentDownload">http://web.mit.edu/kerberos</Property>
<Property Id="UPGRADENSIS">
- <RegistrySearch Id="regsrch_NSIS" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Kerberos for Windows" Name="UninstallString" Type="file"/>
+ <RegistrySearch Id="regsrch_NSIS" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Kerberos for Windows" Name="UninstallString" Type="raw"/>
</Property>
<Property Id="NSISVERSION">