Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)

share|improve this question
    
I know nothing about IEEE802.1X authentication, but I guess it's stored in the registry. I'd use a monitoring tool like Procmon to see what the changes are between the two settings, and create two batch files to change between them. –  user3463 Mar 16 '11 at 7:36

1 Answer 1

up vote 0 down vote accepted

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

Any suggestions for improvement?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.