# cmd does not recognize ipconfig as an internal or external command



## postgresql

When trying to perform the following cmd instruction
C:\Users\....\ipconfig
I get the following error message
'ipconfig' is not recognized as a internal or external command
Please has someone got a solution?
I'm running windows 7 starter.
but, whenever i used windows\system32\ipconfig ,it will perform succesfully..
Thanks


----------



## Squashman

Look at your Path variable. The system32 directory needs to be listed in the executable search path. If system32 is not in your path it will never find IPconfig unless you are in the directory it resides in or you use the whole path name to execute it.


----------



## khaletech

To elaborate, the environmental variables should have registered the simple command 'ipconfig' to its actual location of '%systemroot%/system32/ipconfig.exe'

If, for some reason, this environmental variable is not set you can follow what Squashman said to forcibly activate the ipconfig.exe

1. open command prompt (Run > "cmd")
2. type cd %systemroot%\system32
3. type ipconfig plus whatever arguments you wanted in addition

You can add this environmental variable so you can run it without the additional steps as follows
1. Open the Start-Menu
2. Right click on 'Computer' and click 'Properties'
3. Click 'Advanced System Settings' on the left hand side
4. Click 'Environmental Variables' at the bottom of the screen
5. In the bottom portion scroll to and then select the line that says 'Path' in the 'Variable' column
6. Click 'Edit'
7. Go to the end of the text box and type the following (without quotes): ";%systemroot%\system32"
7.a. The ';' declares an addition to the list and the text following it adds that particular path to the list.
8. Ok out of all of the screens until you are back to where you started
9. If you had a command prompt open close it because it grabs this information when you first open it up so you must close and then re-open any command prompts you had open prior to the change.
10. Now if you type 'ipconfig' (and any additional arguments) it should run normal.

Let me know if this works for you. I verified by removing the information stated above from my environmental variables and then adding it back and it 1. Made it so ipconfig didn't work once I removed it and then 2. Started working again after I added it back.


----------

