Hello,
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.
Read on! or download the script.
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.
By the way, you get the printed book from Amazon using this link here or the ebook using this link!
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.
Using the WifiPasswordReveal script
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
I entered the code however “Key Content” did not show up. Any other suggestions?
Thanks!
what version of Windows you have please?
Can you also run the following command: “netsh wlan show profiles” and tell me its output?
You need to use “key=clear” ->> netsh wlan show profiles [WiFi-Name] key=clear
The batch file uses the ‘netsh wlan show profiles’ command. You cannot acquire the password in plain text if you are not running this script as admin. The batch file executes without admin access, but it cannot acquire the security key without admin access. So, this is useless if one is not signed in as admin.
Well, I tried it as non admin and so did my friends and it worked. I don’t know why it does not work with you.
The code works great but fails to show special characters. Just to let you know.
do a profile export instead. netsh wlan export profile. The password is encrypted if you are not admin but is should still work.
lallouslab, i looked at your book, and a used copy is $2,000. Is that a typo?
Not a typo. You have other sellers like the publisher as well. Buy it from the publisher: PassingTheKnowledge, LLC for 34.99$
Bro I entered The Given Commands but “Key Content” was not their …….
Please help me
THX
What version of Windows you have and most importantly, what LANGUAGE?
It is hard to troubleshoot the script like this. If it does not work for you just follow the manual method as described in the blog post. First do “netsh wlan show profiles ” then pick a profie and call the other command “wlan show profile name=TheName key=clear” etc…Good luck!
the syntax is netsh wlan show profiles “ProfileName” key=clear. try using netsh wlan show all instead. It gives you a lot more info.
you have to be admin for it to work.
For all who are having problems, note that it will just work if you execute cmd as admin by rightclicking cmd.exe or your script and the choose the option “Run as Administrator” (It may be written diferent. My computer isn’t in English, but I think you will find the option by looking for a shield.).
P.S. Sorry for my Bad English
Could you help me?? When I use the .zip file it only reveals 7 characters and will not work
Chris, please try the manual method: http://lallouslab.net/2014/06/11/how-to-show-saved-windows-8-wifi-passwords/
How do i make the batch file keep going instead of saying: Press any key to continue….
Edit it and remove the “pause” command accordingly. The Batchography book will explain how to understand Batch files.
type PAUSE>NUL to do a quit pause and TIMEOUT /T 5 FOR A COUNTDOWN AND CONTINUE. YOU CAN ALSO USE >NUL WITH TIMEOUT AS WELL SO YOU DON’T SEE THE COUNTDOWN. THE 5 IS FOR SECOUNDS. YOU CAN CHANGE THAT NUMBER TO ANYTHING YOU LIKE
Thanks it works.
My UVerse Modem has an asterisk in the wi-fi password/key.
The downloadable script did not work properly. It gave an error … ‘*’ is not recognized as an internal or external command” … and only showed part of the key.
However, it did show surrounding network keys correctly.
That’s a weird corner case! I suggest you follow the “manual method” in the other articles mentioned in that article.
Bro thanks you are the best Its working best!
worked flawlessly
it works thx bro for the file!!
The Password I get when using PasswordReveal is only 7 characters and will not work
For some reason the batchfile only shows 22 SSID’s and passwords, while I have a lot more stored. I’m trying to figure out why
I see I have a network SSID with an ampersand ‘&’ in it, and there it hangs. Is there a way to escape the character in the script?
It is hard to tell like that. I am not sure the “&” needs to be escaped. The best way to debug the script is to turn off the “@echo off” line at the beginning of the script. Otherwise, just follow the manual steps described in the article.
When i run the command “NETSH WLAN SHOW PROFILES”
the result is “user profiles” NONE.
but when i run the command “NETSH WLAN SHOW networks”
It shows :-
Interface name : Wi-Fi
There are 8 networks currently visible.
SSID 1 : SABRY
Network type : Infrastructure
Authentication : WPA2-Personal
Encryption : CCMP
and so on all the 8 networks.
Tel me how to get passwords of these available networks.
Hello,
thanks for this batch.
Your script works only with password that does not contain special characters such as $*÷” etc. Is there any way to provide compatibility with these special characters?
It also works on Windows 10.
Thanks for the report Ralph. I will investigate the script. Meanwhile, I would suggest you try to follow the manual instructions from the command line.
Hello, thak you for your reply, when I use the instructions provided above, the password is showed correctly with all the characters.
PS: The newset version of BAT file found on github: https://github.com/PassingTheKnowledge/Batchography/commits/master/WifiPasswordReveal.bat does not work – error that system could not find the required path.
I’m going to try this one out sbud full
Waxan kahelqy wbsaydjan