Skip to main content

Bat File to Set /Change IP Address in Windows

1. How set IP Address by running .bat file
Copy the below script to a notepad, change the IP Addresses to your set of IP's and then run the bat file after saving the notepad as .bat file. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
set varip=192.168.1.21
set varsm=255.255.255.0
set vargw=192.168.1.1
set vardns1=192.168.12.101
set vardns2=192.168.12.102
set varhome=www.google.com
REM ***** You don’t need to change anything below this line! ******
ECHO This fanciness is brought to you by AVINASH PILLAI !
ECHO Setting IP Address and Subnet Mask
netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%
ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1
ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%
ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%
ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcusoftwaremicrosoftinternet explorermain" /v "Start Page" /d "%varhome%" /f
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

2. How set IP Address to DHCP by running .bat file
Copy the below script to a notepad and then run the bat file after saving the notepad as .bat file.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@ECHO OFF
ECHO This fanciness is brought to you by AVINASH PILLAI!
ECHO Resetting IP Address and Subnet Mask For DHCP
netsh int ip set address name = "Local Area Connection" source = dhcp
ECHO Resetting DNS For DHCP
netsh int ip set dns name = "Local Area Connection" source = dhcp
ECHO Resetting Windows Internet Name Service (WINS) For DHCP
netsh int ip set wins name = "Local Area Connection" source = dhcp
ECHO Here are the new settings for %computername%:
netsh int ip show config
pause
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Thanks & Regards
Avinash PillaiURL : http://avinashpillai.blogspot.com
Email: avinashp25[AT]gmail[DOT]com

Comments

Popular posts from this blog

Defining AI Ethics

                           Defining AI Ethics Welcome to Defining AI Ethics. Humans rely on culturally agreed-upon morals and standards of action — or ethics — to guide their decision-making, especially for decisions that impact others. As AI is increasingly used to automate and augment decision-making, it is critical that AI is built with ethics at the core so its outcomes align with human ethics and expectations. AI ethics is a multidisciplinary field that investigates how to maximize AI's beneficial impacts while reducing risks and adverse impacts. It explores issues like data responsibility and privacy, inclusion, moral agency, value alignment, accountability, and technology misuse …to understand how to build and use AI in ways that align with human ethics and expectations.  There are five pillars for AI ethics: explainability, fairness,...

Seven Personal Qualities Found In A Good Leader

Whether in fact a person is born a leader or develops skills and abilities to become a leader is open for debate. There are some clear characteristics that are found in good leaders. These qualities can be developed or may be naturally part of their personality. Let us explore them further. Seven Personal Qualities Found In A Good Leader: 1. A good leader has an exemplary character. It is of utmost importance that a leader is trustworthy to lead others. A leader needs to be trusted and be known to live their life with honestly and integrity. A good leader “walks the talk” and in doing so earns the right to have responsibility for others. True authority is born from respect for the good character and trustworthiness of the person who leads.   2.A good leader is enthusiastic about their work or cause and also about their role as leader. People will respond more openly to a person of passion and dedication. Leaders need to be able to be a source of inspiration, and b...

The evolution and future of AI

                  The evolution and future of AI The original AI researchers were very interested in games because they were extremely complex. Huge numbers of possible positions and gains were available, yet they're simple in a certain way. They're simple in that the moves are well-defined, the goals are well-defined. So you don't have to solve everything all at once. With chess in particular, in the work on Deep Blue at IBM, what became apparent, what computers could do on our problem like that was bringing a massive amount of compute resource to do deeper searches, to investigate more options of moves in chess than was previously possible. Watson defeating jeopardy. So this was another crossover point, in the development of AI and cognitive computing. That the questions that IBM was able to answer with jeopardy were questions that weren't simply looking up in the database,...