I want to do the following in a batch file.
Code: Select all
netsh wlan show profiles
Will return names of WiFi networks in range, say might be a list of 5 or six etc
For each of the list of 5 or 6 networks:
Code: Select all
netsh wlan show profiles {WiFi Network Name} key=clear
Then output the list to my profile name in windows under desk top something like
Code: Select all
Echo Wi-Fi Network Password%Key%>>%userprofile%\desktop\%username%.txt
Or something similar so the output text file looks like (example)
Network Profile Name1 PSW = Value of Key Content1
Network Profile Name2 PSW = Value of Key Content2
Network Profile Name3 PSW = Value of Key Content3
etc...
I think the loop will look something like:
Code: Select all
For /F "Tokens=5" %%K In ('Netsh Wlan Show Profile') Do For /F "tokens=2,*" %%L In ('Netsh Wlan Show Profile Name^="%%K" Key^=Clear^|Find /I "Content"'
I dont know just guessing about the loop command. Any super programmers out there that can help me?
Danny