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

Ephone Hunt Groups and Voice Hunt Groups Comparison

SIP phones support Voice Hunt Groups. SCCP phones support Ephone Hunt Groups, and in Cisco Unified CME 4.3 and later versions, SCCP phones also support Voice Hunt Groups.  Table 69  compares the features of Ephone Hunt Groups and Voice Hunt Groups. Table 69 Feature Comparison of Ephone Hunt Groups and Voice Hunt Groups Feature Ephone Hunt Voice Hunt Group Endpoints Supported SCCP only SIP, SCCP, PSTN, and FXS Parallel Hunt Groups (Call Blast) No (for alternative, see the  "Shared-Line Overlays" section ) Yes Hunt Statistics Support Yes No B-ACD Support Yes No Features such as present-call and login/logout Yes No Thanks & Regards Avinash Pillai URL :  http://avinashpillai.blogspot.com Email: avinashp25[AT]gmail[DOT]com

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...

What is Cybersecurity Risk? Definition & Factors to Consider

  Cybersecurity risk has become a leading priority for organizations as they embrace digital transformation and leverage advanced technology solutions to drive business growth and optimize efficiencies. Additionally, many organizations are increasingly reliant on third-party and   fourth-party vendors   or programs.  In this post, we’ll explore what cybersecurity risk is and take a look at some key cybersecurity risk factors that organizations across all industries should keep in mind as they build and refine their   cybersecurity risk management strategy .   What is cybersecurity risk? Cybersecurity risk refers to   potential threats and vulnerabilities   in digital systems. It encompasses the likelihood of a cyberattack compromising data or systems, leading to financial,   reputational , or operational damage. A few examples of cybersecurity risks include   ransomware ,   malware ,   insider threats ,   phishing attacks ...