I haven't used IDE for a while and today, when i opened to do something, it was throwing me multiple errors. Error 1 : error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context The rust-analyzer invokes the command cargo metadata with the flag --filter-platform. This flag was added in Rust 1.41.0. The older versions will give the following error. C:/.cargo/bin/cargo.exe metadata --verbose --format-version 1 --all-features --filter-platform x86_64-pc-windows-msvc stdout : error: Found argument '--filter-platform' which wasn't expected, or isn't valid in this context Error 2 : Another error was Fetching Cargo Config failed. Execution failed (exit code 101). C:/.cargo/bin/cargo.exe -Z unstable-options config get stdout : stderr : error: no such subcommand: `config` Error 3 : Rust 1.39.0 which is no longer supported. It may lead to unexpected errors. Consider upgrading your toolchain to at least 1.56.0 Solution is to
A network engineer often changes the IP of their laptop multiple times during an activity. Typing the IP each time from the network adapter setting is a boring task. Use the following batch script to easily change the IP address. Copy the script in a text editor, edit the details as per your need, save as <name>.bat format. Run it.
<------------------------------------------------------------------------------------------------->
Below section is to put administrative privilege to the bat file.
However this is optional
<------------------------------------------------------------------------------------------------->
@echo off
if _%1_==_payload_ goto :payload
:getadmin
echo %~nx0: elevating self
set vbs=%temp%\getadmin.vbs
echo Set UAC = CreateObject^("Shell.Application"^) >> "%vbs%"
echo UAC.ShellExecute "%~s0", "payload %~sdp0 %*", "", "runas", 1 >> "%vbs%"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
goto :eof
if _%1_==_payload_ goto :payload
:getadmin
echo %~nx0: elevating self
set vbs=%temp%\getadmin.vbs
echo Set UAC = CreateObject^("Shell.Application"^) >> "%vbs%"
echo UAC.ShellExecute "%~s0", "payload %~sdp0 %*", "", "runas", 1 >> "%vbs%"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
goto :eof
<------------------------------------------------------------------------------------------------->
Below is the code and you have to edit as per your need. You get the name details from the network connections page or from CMD.<------------------------------------------------------------------------------------------------->
:payload
@echo off
netsh interface IPv4 set Address name="Ethernet" static 192.168.0.10 255.255.255.0 192.168.0.1
@echo off
netsh interface IPv4 set dns name="Ethernet" static 8.8.8.8
<------------------------------------------------------------------------------------------------->
Finally if you want to revert to DHCP<------------------------------------------------------------------------------------------------->
@echo off
netsh interface IPv4 set address name="Ethernet" source=dhcp
@echo off
netsh interface IPv4 set dns name="Ethernet" source=dhcp
netsh interface IPv4 set address name="Ethernet" source=dhcp
@echo off
netsh interface IPv4 set dns name="Ethernet" source=dhcp