diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-31 22:03:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-31 22:03:44 +0200 |
commit | 760d14a55cb2b60bd048246690d17348b4cd0fdf (patch) | |
tree | 4c2b8516ccc5631e3ce9ff578269683c4cfbcded /src/uninstal.c | |
parent | 7805004319691ee026342525e0bf9df146358dc0 (diff) | |
download | vim-git-760d14a55cb2b60bd048246690d17348b4cd0fdf.tar.gz |
Fix that uninstaller isn't found on 64-bit Windows.
Diffstat (limited to 'src/uninstal.c')
-rw-r--r-- | src/uninstal.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/uninstal.c b/src/uninstal.c index b18a3266c..4b4b6f26f 100644 --- a/src/uninstal.c +++ b/src/uninstal.c @@ -46,8 +46,8 @@ popup_gvim_path(char *buf) int r; /* Open the key where the path to gvim.exe is stored. */ - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, KEY_READ, - &key_handle) != ERROR_SUCCESS) + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, + KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) return 0; /* get the DisplayName out of it to show the user */ @@ -72,8 +72,8 @@ openwith_gvim_path(char *buf) /* Open the key where the path to gvim.exe is stored. */ if (RegOpenKeyEx(HKEY_CLASSES_ROOT, - "Applications\\gvim.exe\\shell\\edit\\command", 0, KEY_READ, - &key_handle) != ERROR_SUCCESS) + "Applications\\gvim.exe\\shell\\edit\\command", 0, + KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) return 0; /* get the DisplayName out of it to show the user */ @@ -95,7 +95,8 @@ remove_popup(void) ++fail; if (RegDeleteKey(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim") != ERROR_SUCCESS) ++fail; - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, + KEY_WOW64_64KEY | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) ++fail; else { |