The “How to show saved Windows 7 Wifi passwords” turned out to be a popular article and to make the life of my readers easier, I decided to apply a newly acquired knowledge and write a tool to make it SUPER EASY to get all the saved WiFi passwords without needing administrative privileges and without having to click through various settings dialogs.
Note: In some cases, if the script fails to run, then you may want to run the script as administrator.
In the past few month, I have been busy writing my new book: “Batchography: The Art of Batch Files Programming” and along the way I learned various Batch files programming tricks!
To get the saved WiFi passwords, one can type two command lines and then scroll through the output to find the needed information. However, not all users are tech savvy and would be intimidated by the command prompt.
To save you from the trouble and relying on the knowledge from Chapters 2 and 3 in the Batchography book, I could easily write an elegant script that reveals all the saved passwords!
I would say that the Batchography book is really handy for solving day to day computer problems with little efforts.
I highly recommend getting this book because you can learn to write similar scripts and sharpen your technical skills.
If you don’t care about the details and the know-how, then skip to the end of the article to get the download information for the script!
How to do it manually from the command prompt
To get the saved WiFi passwords on the system, you have to issue two commands.
The first command is:
netsh wlan show profiles
It will output all the saved network profiles on the system, for example:
C:\Users\User>netsh wlan show profiles Profiles on interface Wi-Fi: Group policy profiles (read only) --------------------------------- <None> User profiles ------------- All User Profile : WifiNetwork1 All User Profile : WifiNetwork2 All User Profile : WifiNetwork3
Now that we have a bunch of network profile names, we will invoke a new command to get the key information about a saved profile:
C:\Users\user>netsh wlan show profile name="WifiNetwork1" key=clear
This command will output various information about the network but in particular the password, referred to as “Key Content”, if the WiFi network was password protected (as opposed to an open WiFi network):
Profile WifiNetwork1 on interface Wi-Fi: ======================================================================= Applied: All User Profile Profile information ------------------- Version : 1 Type : Wireless LAN Name : WifiNetwork1 Control options : Connection mode : Connect manually Network broadcast : Connect only if this network is broadcasting AutoSwitch : Do not switch to other networks MAC Randomization : Disabled Connectivity settings --------------------- Number of SSIDs : 1 SSID name : "WifiNetwork1" Network type : Infrastructure Radio type : [ Any Radio Type ] Vendor extension : Not present Security settings ----------------- Authentication : WPA2-Personal Cipher : CCMP Authentication : WPA2-Personal Cipher : Unknown Security key : Present Key Content : thepassword1 Cost settings ------------- Cost : Unrestricted Congested : No Approaching Data Limit : No Over Data Limit : No Roaming : No Cost Source : Default
The idea then is to repeat the previous command for each saved network profile to retrieve the password.
It is very easy to use the WifiPasswordReveal script. Just download it:
…and then run the Batch file that’s inside the zip archive you just downloaded.
Because you are trying to run an un-signed script from the Internet, you may get a prompt like this:
Just click “More info” and choose “Run anyway”.
Note: If you don’t trust my WifiPasswordReveal script and what it does, you can always read its source code from here or from inside the zip archive you just downloaded!
Here’s a sample output:
Pretty straight forward!
The beauty of this is that you are not downloading any executable files that you don’t know what they do and most importantly you don’t need administrative privileges.
You might also like:
- How to show saved Windows 8 and Windows 10 Wifi passwords
- How to show saved Windows 7 Wifi passwords
- Free WifiShare Tool: Turning your laptop into a hotspot and internet connection sharing station
- Free software
- How to get unlimited free Internet at Airports
- Batchography: The Art of Batch Files Programming – book
- Backup and restore NTFS files permission with the ResetPermission utility