uninstall infinite message box loop

Shachar Shemesh wine-patches at sun.consumer.org.il
Fri Jan 31 00:21:54 CST 2003


This is not a good patch, as it is simptomatic. When running 
uninstaller, and the registry key does not exist, we got stuck in an 
infinite loop.

Changelog:
Shachar Shemesh <winecode at sun.consumer.org.il>

programs/uninstaller/main.c

    * Convert the "RegOpenKey" to "RegCreateKey".


-------------- next part --------------
Index: programs/uninstaller/main.c
===================================================================
RCS file: /home/sun/sources/cvs/wine/programs/uninstaller/main.c,v
retrieving revision 1.10
diff -u -r1.10 main.c
--- programs/uninstaller/main.c	5 Jul 2002 21:23:54 -0000	1.10
+++ programs/uninstaller/main.c	31 Jan 2003 06:18:34 -0000
@@ -196,8 +196,9 @@
 
     numentries = 0;
     oldsel = -1;
-    if ( RegOpenKeyEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_UNINSTALL,
-			    0, KEY_READ, &hkeyUninst) != ERROR_SUCCESS )
+    if ( RegCreateKeyEx(HKEY_LOCAL_MACHINE, REGSTR_PATH_UNINSTALL,
+			    0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ,
+                            NULL, &hkeyUninst, NULL) != ERROR_SUCCESS )
     {
 	MessageBox(0, "Uninstall registry key not available (yet), nothing to do !", appname, MB_OK);
 	return 0;


More information about the wine-patches mailing list