0
0
mirror of https://github.com/vim/vim.git synced 2025-10-17 07:44:28 -04:00

Fix that uninstaller isn't found on 64-bit Windows.

This commit is contained in:
Bram Moolenaar
2010-07-31 22:03:44 +02:00
parent 7805004319
commit 760d14a55c
6 changed files with 23 additions and 33 deletions

View File

@@ -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
{