1

I have recently installed Windows 2012. Unable to use common commands previously used e.g. "ipconfig" "hostname" etc. Have tried both Run as Administrator and non admin.

5
  • 1
    What's the error message you receive? Check your $PATH and compare with a working server.
    – duenni
    Feb 28, 2017 at 12:46
  • @duenni the error i get is C:\Users\Administrator>ipconfig 'ipconfig' is not recognized as an internal or external command, operable program or batch file.
    – Airboss
    Mar 2, 2017 at 3:35
  • Path Dump == working server == C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\VisualSVN Server\bin == new 2012 server == %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\
    – Airboss
    Mar 2, 2017 at 3:38
  • And what do you get for echo %systemroot% ? Mar 6, 2017 at 17:28
  • i64.tinypic.com/zu7pl.jpg
    – Airboss
    Mar 7, 2017 at 3:28

1 Answer 1

2

If the ipconfig or other commands are not working, it is due to path variable missing in configuration.

Follow these steps to fix it:

  1. Open the Start-Menu and Right click on ‘Computer’ and click ‘Properties
  2. Click ‘Advanced System Settings’ then ‘Environmental Variables’ at the bottom of the screen
  3. Check for ‘Path’ in the list. If it is present, Click ‘Edit’
  4. Go to the end of the text box and type the following (without quotes): %systemroot%\system32

3b. If it does not exist, create it with the ‘new’ button,

4b. In the next window, enter the variable name as Path. Enter the variable path as, “;%systemroot%\system32” (without quotes).

  1. Click ok to close.

Now open a new cmd prompt and type ‘ipconfig‘ or any of the system commands and they should work fine!

2
  • Thanks @Overmind managed to get it solved but adding the full path at the end.
    – Airboss
    Mar 7, 2017 at 5:10
  • Glad it worked.
    – Overmind
    Mar 7, 2017 at 8:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .