Only set COMSPEC if not defined already.
This commit is contained in:
parent
d8cb43c78e
commit
2e9f786d83
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue