Changelog: wine/scheduler/process.c Use COMSPEC command interpreter to run .bat files -- Uwe Bonnes bon@elektron.ikp.physik.tu-darmstadt.de Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt --------- Tel. 06151 162516 -------- Fax. 06151 164321 ---------- Index: wine/scheduler/process.c =================================================================== RCS file: /home/wine/wine/scheduler/process.c,v retrieving revision 1.203 diff -u -r1.203 process.c --- wine/scheduler/process.c 21 Nov 2002 03:45:01 -0000 1.203 +++ wine/scheduler/process.c 24 Nov 2002 17:47:11 -0000 @@ -1263,7 +1263,23 @@ inherit, flags, startup_info, info, unixdir ); break; } - /* fall through */ + else if ((p = strrchr( name, '.' )) && !FILE_strcasecmp( p, ".bat" )) + { + char * newcmdline, *q; + char buff[MAX_PATH]; + GetEnvironmentVariableA("COMSPEC", buff, MAX_PATH); + q = strchr(cmd_line, ' '); + TRACE( "starting %s as batch binary, rest of cmdline %s\n", debugstr_a(name), q?q:"" ); + if ((newcmdline = HeapAlloc( GetProcessHeap(), 0, strlen(buff) + strlen(name) + (q?strlen(q):0) + 8))) + { + sprintf( newcmdline, "%s /c %s %s", buff, name, (q)?q:""); + retv = CreateProcessA( NULL, newcmdline, process_attr, thread_attr,inherit, + flags, env, cur_dir, startup_info, info ); + HeapFree( GetProcessHeap(), 0, newcmdline); + break; + } + } + /* fall through */ case BINARY_UNIX_EXE: { /* unknown file, try as unix executable */