Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 55a9864

Browse files
author
Thomas Heller
committed
Don't complain that non-existant registry entries cannot be deleted.
1 parent c849e63 commit 55a9864

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PC/bdist_wininst/install.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ void DeleteRegistryKey(char *string)
21692169
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
21702170
else {
21712171
result = RegDeleteKey(hKey, subkeyname);
2172-
if (result != ERROR_SUCCESS)
2172+
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
21732173
MessageBox(GetFocus(), string, "Could not delete key", MB_OK);
21742174
RegCloseKey(hKey);
21752175
}
@@ -2211,7 +2211,7 @@ void DeleteRegistryValue(char *string)
22112211
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
22122212
else {
22132213
result = RegDeleteValue(hKey, valuename);
2214-
if (result != ERROR_SUCCESS)
2214+
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
22152215
MessageBox(GetFocus(), string, "Could not delete value", MB_OK);
22162216
RegCloseKey(hKey);
22172217
}

0 commit comments

Comments
 (0)