Mercurial > vim
annotate src/uninstal.c @ 2466:b204ac54bea4 vim73
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 01 Aug 2010 21:15:45 +0200 |
parents | 943280505f72 |
children | 7d1044b27eb5 |
rev | line source |
---|---|
7 | 1 /* vi:set ts=8 sts=4 sw=4: |
2 * | |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 * See README.txt for an overview of the Vim source code. | |
8 */ | |
9 | |
10 /* | |
11 * uninstal.c: Minimalistic uninstall program for Vim on MS-Windows | |
12 * Removes: | |
13 * - the "Edit with Vim" popup menu entry | |
14 * - the Vim "Open With..." popup menu entry | |
15 * - any Vim Batch files in the path | |
16 * - icons for Vim on the Desktop | |
17 * - the Vim entry in the Start Menu | |
18 */ | |
19 | |
20 /* Include common code for dosinst.c and uninstal.c. */ | |
21 #include "dosinst.h" | |
22 | |
23 /* | |
24 * Return TRUE if the user types a 'y' or 'Y', FALSE otherwise. | |
25 */ | |
26 static int | |
27 confirm(void) | |
28 { | |
29 char answer[10]; | |
30 | |
31 fflush(stdout); | |
32 return (scanf(" %c", answer) == 1 && toupper(answer[0]) == 'Y'); | |
33 } | |
34 | |
35 #ifdef WIN3264 | |
36 /* | |
37 * Check if the popup menu entry exists and what gvim it refers to. | |
38 * Returns non-zero when it's found. | |
39 */ | |
40 static int | |
41 popup_gvim_path(char *buf) | |
42 { | |
43 HKEY key_handle; | |
44 DWORD value_type; | |
45 DWORD bufsize = BUFSIZE; | |
46 int r; | |
47 | |
48 /* Open the key where the path to gvim.exe is stored. */ | |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
49 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
50 KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) |
7 | 51 return 0; |
52 | |
53 /* get the DisplayName out of it to show the user */ | |
54 r = RegQueryValueEx(key_handle, "path", 0, | |
55 &value_type, (LPBYTE)buf, &bufsize); | |
56 RegCloseKey(key_handle); | |
57 | |
58 return (r == ERROR_SUCCESS); | |
59 } | |
60 | |
61 /* | |
62 * Check if the "Open With..." menu entry exists and what gvim it refers to. | |
63 * Returns non-zero when it's found. | |
64 */ | |
65 static int | |
66 openwith_gvim_path(char *buf) | |
67 { | |
68 HKEY key_handle; | |
69 DWORD value_type; | |
70 DWORD bufsize = BUFSIZE; | |
71 int r; | |
72 | |
73 /* Open the key where the path to gvim.exe is stored. */ | |
74 if (RegOpenKeyEx(HKEY_CLASSES_ROOT, | |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
75 "Applications\\gvim.exe\\shell\\edit\\command", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
76 KEY_WOW64_64KEY | KEY_READ, &key_handle) != ERROR_SUCCESS) |
7 | 77 return 0; |
78 | |
79 /* get the DisplayName out of it to show the user */ | |
80 r = RegQueryValueEx(key_handle, "", 0, &value_type, (LPBYTE)buf, &bufsize); | |
81 RegCloseKey(key_handle); | |
82 | |
83 return (r == ERROR_SUCCESS); | |
84 } | |
85 | |
86 static void | |
87 remove_popup(void) | |
88 { | |
89 int fail = 0; | |
90 HKEY kh; | |
91 | |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
92 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\\InProcServer32", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
93 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 94 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
95 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{51EEE242-AD87-11d3-9C1E-0090278BBD99}", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
96 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 97 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
98 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "*\\shellex\\ContextMenuHandlers\\gvim", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
99 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 100 ++fail; |
2449
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
101 if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", 0, |
943280505f72
Fix that uninstaller isn't found on 64-bit Windows.
Bram Moolenaar <bram@vim.org>
parents:
2287
diff
changeset
|
102 KEY_WOW64_64KEY | KEY_ALL_ACCESS, &kh) != ERROR_SUCCESS) |
7 | 103 ++fail; |
104 else | |
105 { | |
106 if (RegDeleteValue(kh, "{51EEE242-AD87-11d3-9C1E-0090278BBD99}") != ERROR_SUCCESS) | |
107 ++fail; | |
108 RegCloseKey(kh); | |
109 } | |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
110 if (RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
111 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 112 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
113 if (RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
114 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 115 ++fail; |
116 | |
117 if (fail == 6) | |
118 printf("No Vim popup registry entries could be removed\n"); | |
119 else if (fail > 0) | |
120 printf("Some Vim popup registry entries could not be removed\n"); | |
121 else | |
122 printf("The Vim popup registry entries have been removed\n"); | |
123 } | |
124 | |
125 static void | |
126 remove_openwith(void) | |
127 { | |
128 int fail = 0; | |
129 | |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
130 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit\\command", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
131 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 132 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
133 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell\\edit", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
134 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 135 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
136 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe\\shell", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
137 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 138 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
139 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "Applications\\gvim.exe", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
140 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 141 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
142 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, ".htm\\OpenWithList\\gvim.exe", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
143 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 144 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
145 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, ".vim\\OpenWithList\\gvim.exe", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
146 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 147 ++fail; |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
148 if (RegDeleteKeyEx(HKEY_CLASSES_ROOT, "*\\OpenWithList\\gvim.exe", |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
149 KEY_WOW64_64KEY, 0) != ERROR_SUCCESS) |
7 | 150 ++fail; |
151 | |
152 if (fail == 7) | |
153 printf("No Vim open-with registry entries could be removed\n"); | |
154 else if (fail > 0) | |
155 printf("Some Vim open-with registry entries could not be removed\n"); | |
156 else | |
157 printf("The Vim open-with registry entries have been removed\n"); | |
158 } | |
159 #endif | |
160 | |
161 /* | |
162 * Check if a batch file is really for the current version. Don't delete a | |
163 * batch file that was written for another (possibly newer) version. | |
164 */ | |
165 static int | |
166 batfile_thisversion(char *path) | |
167 { | |
168 FILE *fd; | |
169 char line[BUFSIZE]; | |
170 char *p; | |
171 int ver_len = strlen(VIM_VERSION_NODOT); | |
172 int found = FALSE; | |
173 | |
174 fd = fopen(path, "r"); | |
175 if (fd != NULL) | |
176 { | |
177 while (fgets(line, BUFSIZE, fd) != NULL) | |
178 { | |
179 for (p = line; *p != 0; ++p) | |
180 /* don't accept "vim60an" when looking for "vim60". */ | |
181 if (strnicmp(p, VIM_VERSION_NODOT, ver_len) == 0 | |
182 && !isdigit(p[ver_len]) | |
183 && !isalpha(p[ver_len])) | |
184 { | |
185 found = TRUE; | |
186 break; | |
187 } | |
188 if (found) | |
189 break; | |
190 } | |
191 fclose(fd); | |
192 } | |
193 return found; | |
194 } | |
195 | |
196 static int | |
197 remove_batfiles(int doit) | |
198 { | |
199 char *batfile_path; | |
200 int i; | |
201 int found = 0; | |
202 | |
203 for (i = 1; i < TARGET_COUNT; ++i) | |
204 { | |
205 batfile_path = searchpath_save(targets[i].batname); | |
206 if (batfile_path != NULL && batfile_thisversion(batfile_path)) | |
207 { | |
208 ++found; | |
209 if (doit) | |
210 { | |
211 printf("removing %s\n", batfile_path); | |
212 remove(batfile_path); | |
213 } | |
214 else | |
215 printf(" - the batch file %s\n", batfile_path); | |
216 free(batfile_path); | |
217 } | |
218 } | |
219 return found; | |
220 } | |
221 | |
222 #ifdef WIN3264 | |
223 static void | |
224 remove_if_exists(char *path, char *filename) | |
225 { | |
226 char buf[BUFSIZE]; | |
227 FILE *fd; | |
228 | |
229 sprintf(buf, "%s\\%s", path, filename); | |
230 | |
231 fd = fopen(buf, "r"); | |
232 if (fd != NULL) | |
233 { | |
234 fclose(fd); | |
235 printf("removing %s\n", buf); | |
236 remove(buf); | |
237 } | |
238 } | |
239 | |
240 static void | |
241 remove_icons(void) | |
242 { | |
243 char path[BUFSIZE]; | |
244 int i; | |
245 | |
246 if (get_shell_folder_path(path, "desktop")) | |
247 for (i = 0; i < ICON_COUNT; ++i) | |
248 remove_if_exists(path, icon_link_names[i]); | |
249 } | |
250 | |
251 static void | |
252 remove_start_menu(void) | |
253 { | |
254 char path[BUFSIZE]; | |
255 int i; | |
256 struct stat st; | |
257 | |
258 if (get_shell_folder_path(path, VIM_STARTMENU)) | |
259 { | |
260 for (i = 1; i < TARGET_COUNT; ++i) | |
261 remove_if_exists(path, targets[i].lnkname); | |
262 remove_if_exists(path, "uninstall.lnk"); | |
263 remove_if_exists(path, "Help.lnk"); | |
264 /* Win95 uses .pif, WinNT uses .lnk */ | |
265 remove_if_exists(path, "Vim tutor.pif"); | |
266 remove_if_exists(path, "Vim tutor.lnk"); | |
267 remove_if_exists(path, "Vim online.url"); | |
268 if (stat(path, &st) == 0) | |
269 { | |
270 printf("removing %s\n", path); | |
271 rmdir(path); | |
272 } | |
273 } | |
274 } | |
275 #endif | |
276 | |
277 #if 0 /* currently not used */ | |
278 /* | |
279 * Return TRUE when we're on Windows 95/98/ME. | |
280 */ | |
281 static int | |
282 win95(void) | |
283 { | |
284 static int done = FALSE; | |
285 static DWORD PlatformId; | |
286 | |
287 if (!done) | |
288 { | |
289 OSVERSIONINFO ovi; | |
290 | |
291 ovi.dwOSVersionInfoSize = sizeof(ovi); | |
292 GetVersionEx(&ovi); | |
293 PlatformId = ovi.dwPlatformId; | |
294 done = TRUE; | |
295 } | |
296 /* Win NT/2000/XP is VER_PLATFORM_WIN32_NT */ | |
297 return PlatformId == VER_PLATFORM_WIN32_WINDOWS; | |
298 } | |
299 #endif | |
300 | |
301 static void | |
302 delete_uninstall_key(void) | |
303 { | |
304 #ifdef WIN3264 | |
2466
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
305 RegDeleteKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT, |
b204ac54bea4
Fix: the MS-Windows uninstaller did not delete registry keys on 64 bit systems.
Bram Moolenaar <bram@vim.org>
parents:
2449
diff
changeset
|
306 KEY_WOW64_64KEY, 0); |
7 | 307 #else |
308 FILE *fd; | |
309 char buf[BUFSIZE]; | |
310 | |
311 /* | |
312 * On DJGPP we delete registry entries by creating a .inf file and | |
313 * installing it. | |
314 */ | |
315 fd = fopen("vim.inf", "w"); | |
316 if (fd != NULL) | |
317 { | |
318 fprintf(fd, "[version]\n"); | |
319 fprintf(fd, "signature=\"$CHICAGO$\"\n\n"); | |
320 fprintf(fd, "[DefaultInstall]\n"); | |
321 fprintf(fd, "DelReg=DeleteMe\n\n"); | |
322 fprintf(fd, "[DeleteMe]\n"); | |
323 fprintf(fd, "HKLM,\"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Vim " VIM_VERSION_SHORT "\"\n"); | |
324 fclose(fd); | |
325 | |
326 /* Don't know how to detect Win NT with DJGPP. Hack: Just try the Win | |
327 * 95/98/ME method, since the DJGPP version can't use long filenames | |
328 * on Win NT anyway. */ | |
329 sprintf(buf, "rundll setupx.dll,InstallHinfSection DefaultInstall 132 %s\\vim.inf", installdir); | |
330 run_command(buf); | |
331 #if 0 | |
332 /* Windows NT method (untested). */ | |
333 sprintf(buf, "rundll32 syssetup,SetupInfObjectInstallAction DefaultInstall 128 %s\\vim.inf", installdir); | |
334 run_command(buf); | |
335 #endif | |
336 | |
337 remove("vim.inf"); | |
338 } | |
339 #endif | |
340 } | |
341 | |
342 int | |
343 main(int argc, char *argv[]) | |
344 { | |
345 int found = 0; | |
346 FILE *fd; | |
347 #ifdef WIN3264 | |
348 int i; | |
349 struct stat st; | |
350 char icon[BUFSIZE]; | |
351 char path[BUFSIZE]; | |
352 char popup_path[BUFSIZE]; | |
353 | |
354 /* The nsis uninstaller calls us with a "-nsis" argument. */ | |
355 if (argc == 2 && stricmp(argv[1], "-nsis") == 0) | |
356 interactive = FALSE; | |
357 else | |
358 #endif | |
359 interactive = TRUE; | |
360 | |
361 /* Initialize this program. */ | |
362 do_inits(argv); | |
363 | |
364 printf("This program will remove the following items:\n"); | |
365 | |
366 #ifdef WIN3264 | |
367 if (popup_gvim_path(popup_path)) | |
368 { | |
369 printf(" - the \"Edit with Vim\" entry in the popup menu\n"); | |
370 printf(" which uses \"%s\"\n", popup_path); | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
371 if (interactive) |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
372 printf("\nRemove it (y/n)? "); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
373 if (!interactive || confirm()) |
7 | 374 { |
375 remove_popup(); | |
376 /* Assume the "Open With" entry can be removed as well, don't | |
377 * bother the user with asking him again. */ | |
378 remove_openwith(); | |
379 } | |
380 } | |
381 else if (openwith_gvim_path(popup_path)) | |
382 { | |
383 printf(" - the Vim \"Open With...\" entry in the popup menu\n"); | |
384 printf(" which uses \"%s\"\n", popup_path); | |
385 printf("\nRemove it (y/n)? "); | |
386 if (confirm()) | |
387 remove_openwith(); | |
388 } | |
389 | |
390 if (get_shell_folder_path(path, "desktop")) | |
391 { | |
392 printf("\n"); | |
393 for (i = 0; i < ICON_COUNT; ++i) | |
394 { | |
395 sprintf(icon, "%s\\%s", path, icon_link_names[i]); | |
396 if (stat(icon, &st) == 0) | |
397 { | |
398 printf(" - the \"%s\" icon on the desktop\n", icon_names[i]); | |
399 ++found; | |
400 } | |
401 } | |
402 if (found > 0) | |
403 { | |
404 if (interactive) | |
405 printf("\nRemove %s (y/n)? ", found > 1 ? "them" : "it"); | |
406 if (!interactive || confirm()) | |
407 remove_icons(); | |
408 } | |
409 } | |
410 | |
411 if (get_shell_folder_path(path, VIM_STARTMENU) | |
412 && stat(path, &st) == 0) | |
413 { | |
414 printf("\n - the \"%s\" entry in the Start Menu\n", VIM_STARTMENU); | |
415 if (interactive) | |
416 printf("\nRemove it (y/n)? "); | |
417 if (!interactive || confirm()) | |
418 remove_start_menu(); | |
419 } | |
420 #endif | |
421 | |
422 printf("\n"); | |
423 found = remove_batfiles(0); | |
424 if (found > 0) | |
425 { | |
426 if (interactive) | |
427 printf("\nRemove %s (y/n)? ", found > 1 ? "them" : "it"); | |
428 if (!interactive || confirm()) | |
429 remove_batfiles(1); | |
430 } | |
431 | |
432 fd = fopen("gvim.exe", "r"); | |
433 if (fd != NULL) | |
434 { | |
435 fclose(fd); | |
436 printf("gvim.exe detected. Attempting to unregister gvim with OLE\n"); | |
437 system("gvim.exe -silent -unregister"); | |
438 } | |
439 | |
440 delete_uninstall_key(); | |
441 | |
442 if (interactive) | |
443 { | |
444 printf("\nYou may now want to delete the Vim executables and runtime files.\n"); | |
445 printf("(They are still where you unpacked them.)\n"); | |
446 } | |
447 | |
2217
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
448 if (interactive) |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
449 { |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
450 rewind(stdin); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
451 printf("\nPress Enter to exit..."); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
452 (void)getchar(); |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
453 } |
120502692d82
Improve the MS-Windows installer.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
454 else |
2287
573da4dac306
Make the dos installer work with more compilers.
Bram Moolenaar <bram@vim.org>
parents:
2217
diff
changeset
|
455 sleep(3); |
7 | 456 |
457 return 0; | |
458 } |