Tema: Re: identiški nustatymai lan ir wifi
Autorius: G
Data: 2016-02-11 11:22:33
Neįmanoma. Pasidaryk .bat failą, gali prireikti elevated teisių... ir 
leisk shortcut'ą iš desktopo, nereiks ir į control panelį lįsti:


**** enable_wifi.bat

wmic path win32_networkadapter where NetConnectionID="Local Area 
Connection" call disable

wmic path win32_networkadapter where NetConnectionID="Wireless Network 
Connection" call enable

netsh interface ip set address name="Local Area Connection" static 
192.168.1.2 255.255.255.0 192.168.1.253

netsh interface ip set address name="Wireless Network Connection" static 
192.168.1.1 255.255.255.0 192.168.1.254



**** enable_lan.bat

wmic path win32_networkadapter where NetConnectionID="Wireless Network 
Connection" call disable

wmic path win32_networkadapter where NetConnectionID="Local Area 
Connection" call enable

netsh interface ip set address name="Wireless Network Connection" static 
192.168.1.2 255.255.255.0 192.168.1.253

netsh interface ip set address name="Local Area Connection" static 
192.168.1.1 255.255.255.0 192.168.1.254





Sužinoti adapterių vardus gali ir su "wmic nic get name, index".


On 2016.02.11 10:59, Audrimas wrote:
> Ar įmanoma apieiti šitą bibienę
>
> "Windows 7 will not allow you to set the same IP address on two
> different network adapters, even if one is disabled.  It will "blank
> out" the IP address for the second network adapter, and when you
> re-enable it you will get an "autoconfigured" IP (not DHCP)"
>
> Ant xp tikrai galima buvo sudėti identiškus nustatymus ant dviejų
> adapterių ir naudoti arba vieną arba kitą pagal poreikį.