0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -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

@@ -50,14 +50,6 @@ WINOLEAUTAPI UnRegisterTypeLib(REFGUID libID, WORD wVerMajor,
WORD wVerMinor, LCID lcid, SYSKIND syskind);
#endif
/*
* Modern way of creating registry entries, also works on 64 bit windows when
* compiled as a 32 bit program.
*/
# ifndef KEY_WOW64_64KEY
# define KEY_WOW64_64KEY 0x0100
# endif
/*****************************************************************************
1. Internal definitions for this file
*****************************************************************************/
@@ -166,7 +158,7 @@ CVim *CVim::Create(int *pbDoRestart)
// RegCreateKeyEx succeeds even if key exists. W.Briscoe W2K 20021011
if (RegCreateKeyEx(HKEY_CLASSES_ROOT, MYVIPROGID, 0, NULL,
REG_OPTION_NON_VOLATILE,
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL, &hKey, NULL))
KEY_ALL_ACCESS, NULL, &hKey, NULL))
{
delete me;
return NULL; // Unable to write to registry. Quietly fail.
@@ -658,7 +650,8 @@ static void RecursiveDeleteKey(HKEY hKeyParent, const char *child)
{
// Open the child
HKEY hKeyChild;
LONG result = RegOpenKeyEx(hKeyParent, child, 0, KEY_ALL_ACCESS, &hKeyChild);
LONG result = RegOpenKeyEx(hKeyParent, child, 0,
KEY_ALL_ACCESS, &hKeyChild);
if (result != ERROR_SUCCESS)
return;
@@ -701,7 +694,7 @@ static void SetKeyAndValue(const char *key, const char *subkey, const char *valu
long result = RegCreateKeyEx(HKEY_CLASSES_ROOT,
buffer,
0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WOW64_64KEY | KEY_ALL_ACCESS, NULL,
KEY_ALL_ACCESS, NULL,
&hKey, NULL);
if (result != ERROR_SUCCESS)
return;