From 2e9f786d831aeddd53145e98bb035edb583f6680 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 1 Aug 2000 23:34:01 +0000 Subject: [PATCH] Only set COMSPEC if not defined already. --- files/directory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/directory.c b/files/directory.c index 063a83f9c2b..597bee56286 100644 --- a/files/directory.c +++ b/files/directory.c @@ -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",