diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-08-01 21:15:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-08-01 21:15:45 +0200 |
commit | 3a0ae77fe644f69b7d3c432d0ceb2d15c43dbdfb (patch) | |
tree | fc1f6ecaf464b0b7489f4b8c188e51c806c57013 /src/uninstal.c | |
parent | 9379f83030f05e81ebe0e8312b711ae830bbfbb7 (diff) | |
download | vim-git-3a0ae77fe644f69b7d3c432d0ceb2d15c43dbdfb.tar.gz |
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Diffstat (limited to 'src/uninstal.c')
-rw-r--r-- | src/uninstal.c | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/uninstal.c b/src/uninstal.c index 4b4b6f26f..13138aafb 100644 --- a/src/uninstal.c +++ b/src/uninstal.c @@ -89,11 +89,14 @@ remove_popup(void) int fail = 0; HKEY kh; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) @@ -104,9 +107,11 @@ remove_popup(void) ++fail; RegCloseKey(kh); } - if (RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\\Vim") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; if (fail == 6) @@ -122,19 +127,26 @@ remove_openwith(void) { int fail = 0; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "Applications\\gvim.exe") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; - if (RegDeleteKey(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe") != ERROR_SUCCESS) + if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe", + KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) ++fail; if (fail == 7) @@ -290,7 +302,8 @@ win95(void) delete_uninstall_key(void) { #ifdef WIN3264 - RegDeleteKey(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT); + RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT, + KEY_WOW64_64KEY, 0); #else FILE *fd; char buf[BUFSIZE]; |