summaryrefslogtreecommitdiffstats
path: root/src/dosinst.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-31 22:03:44 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-31 22:03:44 +0200
commit760d14a55cb2b60bd048246690d17348b4cd0fdf (patch)
tree4c2b8516ccc5631e3ce9ff578269683c4cfbcded /src/dosinst.c
parent7805004319691ee026342525e0bf9df146358dc0 (diff)
Fix that uninstaller isn't found on 64-bit Windows.
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/dosinst.c b/src/dosinst.c
index 6dcb5e30db..979d6fe879 100644
--- a/src/dosinst.c
+++ b/src/dosinst.c
@@ -462,8 +462,8 @@ uninstall_check(int skip_question)
DWORD new_num_keys;
int foundone = 0;
- code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, uninstall_key, 0, KEY_READ,
- &key_handle);
+ code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, uninstall_key, 0,
+ KEY_WOW64_64KEY | KEY_READ, &key_handle);
CHECK_REG_ERROR(code);
for (key_index = 0;
@@ -475,8 +475,8 @@ uninstall_check(int skip_question)
if (strncmp("Vim", subkey_name_buff, 3) == 0)
{
/* Open the key named Vim* */
- code = RegOpenKeyEx(key_handle, subkey_name_buff, 0, KEY_READ,
- &uninstall_key_handle);
+ code = RegOpenKeyEx(key_handle, subkey_name_buff, 0,
+ KEY_WOW64_64KEY | KEY_READ, &uninstall_key_handle);
CHECK_REG_ERROR(code);
/* get the DisplayName out of it to show the user */
@@ -1352,14 +1352,6 @@ init_vimrc_choices(void)
}
#if defined(WIN3264)
-/*
- * 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
-
static LONG
reg_create_key(
HKEY root,
/* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
" An example for a vimrc file.
"
" Maintainer:	Bram Moolenaar <Bram@vim.org>
" Last change:	2002 Sep 19
"
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"	      for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"	    for OpenVMS:  sys$login:.vimrc

" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
  finish
endif

" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

if has("vms")
  set nobackup		" do not keep a backup file, use versions instead
else
  set backup		" keep a backup file
endif
set history=50		" keep 50 lines of command line history
set ruler		" show the cursor position all the time
set showcmd		" display incomplete commands
set incsearch		" do incremental searching

" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")

" Don't use Ex mode, use Q for formatting
map Q gq

" This is an alternative that also works in block mode, but the deleted
" text is lost and it only works for putting the current register.
"vnoremap p "_dp

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

" Only do this part when compiled with support for autocommands.
if has("autocmd")

  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,
  " 'cindent' is on in C files, etc.
  " Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on

  " Put these in an autocmd group, so that we can delete them easily.
  augroup vimrcEx
  au!

  " For all text files set 'textwidth' to 78 characters.
  autocmd FileType text setlocal textwidth=78

  " When editing a file, always jump to the last known cursor position.
  " Don't do it when the position is invalid or when inside an event handler
  " (happens when dropping a file on gvim).
  autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif

  augroup END

else

  set autoindent		" always set autoindenting on

endif " has("autocmd")