diff src/uninstal.c @ 2217:120502692d82 vim73

Improve the MS-Windows installer.
author Bram Moolenaar <bram@vim.org>
date Mon, 24 May 2010 21:34:22 +0200
parents 3fc0f57ecb91
children 573da4dac306
line wrap: on
line diff
--- a/src/uninstal.c
+++ b/src/uninstal.c
@@ -354,8 +354,9 @@ main(int argc, char *argv[])
     {
 	printf(" - the \"Edit with Vim\" entry in the popup menu\n");
 	printf("   which uses \"%s\"\n", popup_path);
-	printf("\nRemove it (y/n)? ");
-	if (confirm())
+	if (interactive)
+	    printf("\nRemove it (y/n)? ");
+	if (!interactive || confirm())
 	{
 	    remove_popup();
 	    /* Assume the "Open With" entry can be removed as well, don't
@@ -430,9 +431,14 @@ main(int argc, char *argv[])
 	printf("(They are still where you unpacked them.)\n");
     }
 
-    rewind(stdin);
-    printf("\nPress Enter to exit...");
-    (void)getchar();
+    if (interactive)
+    {
+	rewind(stdin);
+	printf("\nPress Enter to exit...");
+	(void)getchar();
+    }
+    else
+	Sleep(3000);
 
     return 0;
 }