2

In Windows 7, I use two IEEE802.1X wired network authentitication settings which I have to change by hand, since every time I switch the configuration, the old one is lost. (In Linux this is trivially handled by the wpa-supplicant)

1 Answers1

0

I finally found a script-based solution which exploits the netsh utility in windows 7.

Firstly i used netsh lan export profile folder=<folder> for both 802.1 profiles (I manually set up the first, then exported its settings, then repeated the same for the second, etc), thus I got one XML file for each profile.

Then I wrote a simple script for each of them (have to be run as administrator)

chcp 1250
netsh lan add profile filename="<folder>\profile1.xml" interface="Local Area Network"
PAUSE

provided that the script file has the Windows cp1250 encoding and the network interface has name Local Area Network.

The interface name can be determined by running:

netsh lan show interfaces
Dave
  • 25,513