Only set COMSPEC if not defined already.

This commit is contained in:
Alexandre Julliard 2000-08-01 23:34:01 +00:00
parent d8cb43c78e
commit 2e9f786d83
1 changed files with 4 additions and 1 deletions

View File

@ -129,11 +129,14 @@ int DIR_Init(void)
/* Set the environment variables */
SetEnvironmentVariableA( "PATH", path );
SetEnvironmentVariableA( "COMSPEC", "c:\\command.com" );
SetEnvironmentVariableA( "TEMP", tmp_dir.short_name );
SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
SetEnvironmentVariableA( "winsysdir", 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",
DIR_Windows.short_name, DIR_Windows.long_name );
TRACE("SystemDir = %s (%s)\n",