Skip to content

siddhantrimal/auto-IP-changer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Auto IP Changer

Simple script to invoke elevated automatic configuration of pre-defined IP settings, in command shell

More about older versions of this here

Why was this necessary?

Because (1) I'm a lazy fellow and (2) you should use automation whenever possible. Personally, I've bound this script to a hotkey Ctrl+Shift+I and enjoy a quick network configuration switch everytime I go from Lab-to-Home and vice-versa, so on and so forth.

Usage

  1. Download autoIPsetter.bat
  2. Edit and configure it to your liking. (Editing is available in right-click context menu, as a text file)
    • There following are the defaults

        REM ----------PRESET SETTINGS-------
        set varIP=10.0.80.50
        REM WRITE YOUR COMPUTER IP ABOVE
        set varDefaultGateway=10.0.80.1
        set varSubnetMask=255.255.255.192
        REM --------------------------------
      
  3. Run it. Thats about it.

Known Issues:

  1. The filename,directory name, or volume label syntax is incorrect. System cannot find the file specified.
    • Don't worry, its just a case of self-referencing error on first-run. Please close the batch file and run again, it should not show the error again. Its a self-healing code and creates correct references on the second run.
  2. The batch file was working fine but it stopped running suddenly!
    • Yes, this is also a known issue. Its not actually the Batch-file failing to run, its the side-effect of the said Deadpool-like healing-factor from point#1. The batch file hard-codes the path where it is executed into its own code when it is executed the first time. If you notice the code, there is a certain reference command !batchPath! . This is overwritten on the first pass(i.e. first execution of the batch file). Since the batch file writes itself, it is unavoidable. It is advisable to keep a copy of the original before using (or, you can just visit the repo page again, if you lose the original; link is in the file footer attribution)

Any more issues? Well, I don't know. Why don't you tell me?

License

Standard MIT License. See the LICENSE file

About

simple script to invoke elevated automatic configuration of pre-defined IP settings, in command shell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published