Posted on October 29, 2014 at 12:14 PM
Every day I (and I guess most of us) face an issue regarding the adapter setting change. For office, we have a dedicated IP and settings, so change the settings, then as soon as I go home I need to connect to my home Wi-Fi and that need automatic IP and DNS settings, so again change the settings to default. Previously I was on Ubuntu so I never cared about this as Ubuntu handles this very efficiently. But in Windows go to network settings then adapter settings blah blah blah. So here I will show to create 2 files that is office.bat and default.bat for doing it easily on windows 7. These files changes the settings as soon as you run these files.
:: Configuration Variables ::
set connectionName="Wireless Network Connection"
set ipAddress=x.x.x.x
set subnetMask=x.x.x.x
set defaultGateway=x.x.x.x
set primaryDNS=x.x.x.x
set alternateDNS=x.x.x.x
netsh interface ipv4 set address name=%connectionName% source=static addr=%ipAddress% mask=%subnetMask% gateway=%defaultGateway%
netsh interface ipv4 set dns %connectionName% static %primaryDNS%
netsh interface ipv4 add dns %connectionName% %alternateDNS% index=2
The content in these batch files is self explanatory
connectionName -> The name of the connection you want to modify
:: Configuration Variable ::
set connectionName="Wireless Network Connection"
netsh interface ip set address %connectionName% dhcp
netsh interface ip set dns %connectionName% dhcp
Save this file as default.bat and run as administrator and the setting change to DHCP.
These are applicable for LAN also you just need to give the correct connection name in the connectionName variable.
:: Configuration Variable ::
set connectionName="Wireless Network Connection"
:: Disable ::
netsh interface set interface %connectionName% DISABLED
:: Enable ::
netsh interface set interface %connectionName% ENABLED
Queues and task scheduler in laravel works like a charm. But it can fail in a certain case. In this post, I am going to explain the case where it c...
Some services run on different ports and to access them in the browser we have to mention the port number also. For ex : SonarQube : 9000 [http://1...
Sometimes you need to strike off a row in ExtJS grids, this can be easily done by CSS code. The CSS code will look like this, .strike-through-row {...
When you are working on a laravel project there is some basic setup that needs to be done for each install of the project. Like Permissions for ...
In this blog, we are going to take a look into Laravel Queues. Queues allow you to defer the processing of a time-consuming task, such as sending a...
PARTIALS Let’s say we have a structure like the following : data = { students : [{ name : ‘ABC’, roll : 1 }, { name : ‘DEF&...
PHP 8 has been officially released in November 2020! This new major update brings many optimizations and powerful features to the language. This...
ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts i...
Time is important. We should not waste it doing trivial things. Automate things wherever possible.