cmd: Get rid of obsolete autoexec.bat handling code

Frédéric Delanoy frederic.delanoy at gmail.com
Mon Sep 5 18:13:07 CDT 2011


Presence of the file has always been checked, but has never been actually
executed.
---
 programs/cmd/wcmdmain.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index ce07111..ed1b46c 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -2252,11 +2252,8 @@ int wmain (int argc, WCHAR *argvW[])
   WCHAR  *cmd   = NULL;
   WCHAR string[1024];
   WCHAR envvar[4];
-  HANDLE h;
   int opt_q;
   int opt_t = 0;
-  static const WCHAR autoexec[] = {'\\','a','u','t','o','e','x','e','c','.',
-                                   'b','a','t','\0'};
   static const WCHAR promptW[] = {'P','R','O','M','P','T','\0'};
   static const WCHAR defaultpromptW[] = {'$','P','$','G','\0'};
   char ansiVersion[100];
@@ -2575,19 +2572,6 @@ int wmain (int argc, WCHAR *argvW[])
   }
 
 /*
- *	If there is an AUTOEXEC.BAT file, try to execute it.
- */
-
-  GetFullPathNameW (autoexec, sizeof(string)/sizeof(WCHAR), string, NULL);
-  h = CreateFileW(string, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-  if (h != INVALID_HANDLE_VALUE) {
-    CloseHandle (h);
-#if 0
-    WCMD_batch (autoexec, autoexec, 0, NULL, INVALID_HANDLE_VALUE);
-#endif
-  }
-
-/*
  *	Loop forever getting commands and executing them.
  */
 
-- 
1.7.6




More information about the wine-patches mailing list