mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:50:37 +00:00
Make COMSPEC point to wcmd.exe, not command.com.
This commit is contained in:
parent
ea4913f8f9
commit
d427f731f0
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue