How to set an environment variable to the local IP address in Windows

By | March 17, 2016

This is a simple command batch to get the local IP address from ipconfig command.

The first line is to extract IP address from ipconfig command. The second line is just to trim the leading white space.

To run the command line directly in a command prompt, remember to change %%i to %i.

Leave a Reply

Your email address will not be published. Required fields are marked *