Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d427f731
Commit
d427f731
authored
Nov 04, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make COMSPEC point to wcmd.exe, not command.com.
parent
ea4913f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
directory.c
files/directory.c
+10
-4
No files found.
files/directory.c
View file @
d427f731
...
...
@@ -119,6 +119,8 @@ int DIR_Init(void)
static
const
WCHAR
winsysdirW
[]
=
{
'w'
,
'i'
,
'n'
,
's'
,
'y'
,
's'
,
'd'
,
'i'
,
'r'
,
0
};
static
const
WCHAR
userprofileW
[]
=
{
'U'
,
'S'
,
'E'
,
'R'
,
'P'
,
'R'
,
'O'
,
'F'
,
'I'
,
'L'
,
'E'
,
0
};
static
const
WCHAR
systemrootW
[]
=
{
'S'
,
'Y'
,
'S'
,
'T'
,
'E'
,
'M'
,
'R'
,
'O'
,
'O'
,
'T'
,
0
};
static
const
WCHAR
wcmdW
[]
=
{
'\\'
,
'w'
,
'c'
,
'm'
,
'd'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
const
WCHAR
comspecW
[]
=
{
'C'
,
'O'
,
'M'
,
'S'
,
'P'
,
'E'
,
'C'
,
0
};
static
const
WCHAR
empty_strW
[]
=
{
0
};
if
(
!
getcwd
(
path
,
MAX_PATHNAME_LEN
))
...
...
@@ -171,6 +173,14 @@ int DIR_Init(void)
/* Set the environment variables */
/* set COMSPEC only if it doesn't exist already */
if
(
!
GetEnvironmentVariableW
(
comspecW
,
NULL
,
0
))
{
strcpyW
(
longpath
,
DIR_System
.
short_name
);
strcatW
(
longpath
,
wcmdW
);
SetEnvironmentVariableW
(
comspecW
,
longpath
);
}
/* set PATH only if not set already */
if
(
!
GetEnvironmentVariableW
(
path_capsW
,
longpath
,
MAX_PATHNAME_LEN
))
{
...
...
@@ -189,10 +199,6 @@ int DIR_Init(void)
SetEnvironmentVariableW
(
windirW
,
DIR_Windows
.
short_name
);
SetEnvironmentVariableW
(
winsysdirW
,
DIR_System
.
short_name
);
/* set COMSPEC only if it doesn't exist already */
if
(
!
GetEnvironmentVariableA
(
"COMSPEC"
,
NULL
,
0
))
SetEnvironmentVariableA
(
"COMSPEC"
,
"c:
\\
command.com"
);
TRACE
(
"WindowsDir = %s (%s)
\n
"
,
debugstr_w
(
DIR_Windows
.
short_name
),
DIR_Windows
.
long_name
);
TRACE
(
"SystemDir = %s (%s)
\n
"
,
...
...
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