This topic describes the cause of the following issue and how to resolve the issue: The environment variables configured for an instance that runs Windows Server do not take effect.
The PATH environment variable configured for an instance that runs Windows Server does not take effect. The issue has the following characteristics:
When you run the
ipconfigcommands in Command Prompt, the following error message appears: "is not recognized as an internal or external command, operable program or batch file."
The PATH environment variables on the instance and on a normal host are the same.
The ping.exe file and other files are present in the C:\Windows\System32 directory.
In the actual test, the command that is written as PING.EXE can be run in Command Prompt, and an error is reported if the extension EXE is removed.
In normal cases, the commands can be run without the need to add extensions to the commands because the PATHEXT environment variable exists in the system. In this issue, the EXE extension is missing from the PATHEXT variable.
Perform the following operations:
Connect to the Windows instance.
For more information, see Connect to a Windows instance by using a password or key.
Right-click My Computer and select Properties. In the left-side navigation pane, click Advanced system settings.
Click Environment Variables. In the System variables section, add the .EXE to the PATHEXT value.Note
After you modify the environment variable, start Command Prompt for the variable to take effect.