Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
dab0cf31
Commit
dab0cf31
authored
Dec 03, 2002
by
Uwe Bonnes
Committed by
Alexandre Julliard
Dec 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use COMSPEC command interpreter to run .bat files.
parent
8e266a6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
process.c
scheduler/process.c
+25
-2
No files found.
scheduler/process.c
View file @
dab0cf31
...
...
@@ -1255,14 +1255,37 @@ BOOL WINAPI CreateProcessA( LPCSTR app_name, LPSTR cmd_line, LPSECURITY_ATTRIBUT
inherit
,
flags
,
startup_info
,
info
,
unixdir
);
break
;
case
BINARY_UNKNOWN
:
/* check for .com extension */
if
((
p
=
strrchr
(
name
,
'.'
))
&&
!
FILE_strcasecmp
(
p
,
".com"
))
/* check for .com or .bat extension */
if
((
p
=
strrchr
(
name
,
'.'
)))
{
if
(
!
FILE_strcasecmp
(
p
,
".com"
))
{
TRACE
(
"starting %s as DOS binary
\n
"
,
debugstr_a
(
name
)
);
retv
=
create_process
(
hFile
,
name
,
tidy_cmdline
,
env
,
process_attr
,
thread_attr
,
inherit
,
flags
,
startup_info
,
info
,
unixdir
);
break
;
}
if
(
!
FILE_strcasecmp
(
p
,
".bat"
))
{
char
comspec
[
MAX_PATH
];
if
(
GetEnvironmentVariableA
(
"COMSPEC"
,
comspec
,
sizeof
(
comspec
)))
{
char
*
newcmdline
,
*
q
=
strchr
(
cmd_line
,
' '
);
if
(
!
q
)
q
=
""
;
if
((
newcmdline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
comspec
)
+
strlen
(
name
)
+
strlen
(
q
)
+
8
)))
{
sprintf
(
newcmdline
,
"%s /c %s%s"
,
comspec
,
name
,
q
);
TRACE
(
"starting %s as batch binary: %s
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
newcmdline
)
);
retv
=
CreateProcessA
(
comspec
,
newcmdline
,
process_attr
,
thread_attr
,
inherit
,
flags
,
env
,
cur_dir
,
startup_info
,
info
);
HeapFree
(
GetProcessHeap
(),
0
,
newcmdline
);
break
;
}
}
}
}
/* fall through */
case
BINARY_UNIX_EXE
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment