Alexandre Julliard : uninstaller:
Fail more gracefully when the registry key is missing.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 26 04:22:44 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 084458bc2e292fa44952f760ab8214bb2f182bd9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=084458bc2e292fa44952f760ab8214bb2f182bd9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 25 17:50:27 2006 +0200
uninstaller: Fail more gracefully when the registry key is missing.
---
programs/uninstaller/main.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/programs/uninstaller/main.c b/programs/uninstaller/main.c
index 79cc30b..df97b93 100644
--- a/programs/uninstaller/main.c
+++ b/programs/uninstaller/main.c
@@ -76,8 +76,7 @@ static void ListUninstallPrograms(void)
char *descr;
char *key;
- if (! FetchUninstallInformation())
- return;
+ FetchUninstallInformation();
for (i=0; i < numentries; i++)
{
@@ -100,8 +99,7 @@ static void RemoveSpecificProgram(WCHAR
int lenName;
char *name;
- if (! FetchUninstallInformation())
- return;
+ FetchUninstallInformation();
for (i=0; i < numentries; i++)
{
@@ -196,10 +194,7 @@ static int FetchUninstallInformation(voi
numentries = 0;
oldsel = -1;
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, PathUninstallW, 0, KEY_READ, &hkeyUninst) != ERROR_SUCCESS)
- {
- MessageBoxW(0, sRegistryKeyNotAvailable, sAppName, MB_OK);
return 0;
- }
if (!entries)
entries = HeapAlloc(GetProcessHeap(), 0, sizeof(uninst_entry));
@@ -363,6 +358,7 @@ static void UpdateList(HWND hList)
prevsel = SendMessageW(hList, LB_GETCURSEL, 0, 0);
if (!(FetchUninstallInformation()))
{
+ MessageBoxW(0, sRegistryKeyNotAvailable, sAppName, MB_OK);
PostQuitMessage(0);
return;
}
More information about the wine-cvs
mailing list