Show WiFi password

Post your working scripts, libraries and tools
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Show WiFi password

26 Oct 2016, 02:32

One of the things I don't like about Windows 10 is that you can't see the stored password of WiFi networks that you have connected to, unlike Windows 7. As a result I wrote a wrapper for netsh wlan export profile to make it easier. Please note: This isn't a hack or crack; it just shows passwords that have already been entered and which can be retrieved easily using built-in netsh commands.

Code: Select all

#SingleInstance force ; Force only once instance at a time

; Prompt to 'Run as Admin', i.e. show UAC dialog
If Not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

; Define the GUI
Gui, Add, Text, x30 y10 w310 h30, Please enter the SSID below ; Ask for SSID
Gui, Add, Edit, x12 y40 w180 h20 vSSID, ;Add edit box to input SSID
Gui, Add, Button, x30 y70 w60 h20, OK ; Add OK button
Gui, Add, Button, x120 y70 w60 h20, Cancel ; Add Cancel button
Gui -SysMenu ; Get rid of the maximise, minimise and X controls
Gui, Show, w210 h100, Get Wifi Password ; Show the dialog
GuiControl, Focus, SSID ; Put the focus into the edit box
Return

~Enter:: ; Define ENTER as hotkey
~NumpadEnter:: ; Define ENTER on NumPad as additional hotkey

ButtonOK:
Gui, Submit  ; Save the input from the user to each control's associated variable
pass1= ; Set var to null
RunWait, %comspec% /c "netsh wlan export profile folder=%TEMP% name="%SSID%" key=clear",,  ; Run NETSH and pipe results to file

;MsgBox % SSID ; Used for testing
SSID1=%TEMP%\WiFi-%SSID%.xml
;MsgBox % SSID1 ; Used for testing

FileReadLine, str, %SSID1%, 22 ; Read line 22 of the XML file
FileDelete % SSID1 ; Delete the temporary file
;Run, %TEMP% ; Used for testing

RegexMatch(str, "<keyMaterial>(.+)</keyMaterial>", pass) ; Use RegEx to remove extraneous characters

GuiClose: ; Close the GUI

If pass1 = 
   {
      MsgBox, 64, Get Wifi Password, The name "%SSID%" does not exist as a stored profile. ; Pop up 'not found' message
      ExitApp ; Exit the app
   }
Else
   {
      MsgBox, 64, Get Wifi Password, The WiFi password for "%SSID%" is: "%pass1%" ; Pop up message with the WiFi password
      ExitApp ; Exit the app
   }

GuiEscape: ; Use the Esc key to exit the app
ButtonCancel: ; Use the Cancel button to exit the app
ExitApp  ; The 2 labels above will do this
PS - Comments welcome! If anyone would like to add constructive criticism in order to improve it then I would be grateful. I'm just glad (and a bit surprised) that it works, especially as it's my first ever use of RegexMatch. I was hoping to incorporate netsh wlan show profiles, i.e. to loop through the stored profiles first and show them in the GUI as a reminder but so far my poor coding skills aren't up to it.

Edit: Check my Dec. 8th post further down for a MUCH better version.
Last edited by RickC on 08 Dec 2016, 13:30, edited 2 times in total.
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

27 Oct 2016, 06:55

Hmmm... I didn't think about 2 things:

1) If the SSID name has a space in it. I haven't tested yet but I assume name="%SSID%" will need to be name=""%SSID%"" (i.e. double quotes) to handle spaces.

2) If the SSID name isn't found in the device's profile list and netsh returns Profile %SSID% is not found on any interface.

As a result, please consider the code in post #1 as beta. I should have tested more before posting. :(

EDIT: I've amended my code in post #1 to check for an invalid SSID, i.e. typos, errors, etc. I've also tested with a router using SSIDs with and without spaces... and with passwords with and without spaces, even multiple spaces.

If you get an error, please do the following:

1. Comment out line 33, i.e. insert a semi-colon at the beginning of the line.
2. Un-comment line 34, i.e. remove the semi-colon at the beginning of the line.
3. Save the AHK file and run it again.
3. Check the saved XML file.

Let me know. Many thanks.
Last edited by RickC on 28 Oct 2016, 15:19, edited 1 time in total.
User avatar
DataLife
Posts: 326
Joined: 29 Sep 2013, 19:52

Re: Show WiFi password

28 Oct 2016, 09:49

Did not work for me.

The errorlevel is returning 1 below

FileReadLine, str, %SSID%, 22 ; Read line 22 of the XML file
MsgBox % ErrorLevel

I found that the file created is SSID=%TEMP%\Wi-Fi-%SSID%.xml

But your code is SSID=%TEMP%\WiFi-%SSID%.xml

I changed SSID=%TEMP%\WiFi-%SSID%.xml to SSID=%TEMP%\Wi-Fi-%SSID%.xml

It is working now.
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

28 Oct 2016, 15:36

DataLife wrote:Did not work for me.

The errorlevel is returning 1 below

FileReadLine, str, %SSID%, 22 ; Read line 22 of the XML file
MsgBox % ErrorLevel

I found that the file created is SSID=%TEMP%\Wi-Fi-%SSID%.xml

But your code is SSID=%TEMP%\WiFi-%SSID%.xml

I changed SSID=%TEMP%\WiFi-%SSID%.xml to SSID=%TEMP%\Wi-Fi-%SSID%.xml

It is working now.
netsh in Windows 10 Pro Version 1607 (Build 14393.321) automatically adds the prefix WiFi- (not Wi-Fi-) to the SSID that is input.

Can you let me know what Windows edition/version/build you used it on (in case I have to add more checks)? Many thanks.
User avatar
DataLife
Posts: 326
Joined: 29 Sep 2013, 19:52

Re: Show WiFi password

30 Oct 2016, 00:39

Windows 10 Pro Version 1607 (Build 14393.351)

The name of that file starts with the name of your wireless adapter. In my case my under Control Panel, Network and Internet, Network Connections the name of my wireless adapter is Wi-Fi.

I renamed it WiFi and ran the netsh command again and this time it named the file WiFi-"SSID".xml
I renamed it to MyWiFi and ran the netsh command and the file was named MyWiFi-"SSID".xml
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

30 Oct 2016, 17:18

I changed the script so it now just pops all the stored profiles and passwords, rather than asking for a profile name. This avoids differences in wireless adapter names in Network Connections, and is what I wanted in the first place. :)

Code: Select all

#SingleInstance force ; Force only once instance at a time

; Prompt to 'Run as Admin', i.e. show UAC dialog
If Not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

; ***** Housekeeping *****
FileDelete, %TEMP%\*.xml ; Make sure there are no existing XML files
IfExist %TEMP%\Results.txt ; Make sure there is no existing Results.txt file
    FileDelete, %TEMP%\Results.txt    
FileAppend, Stored WiFi passwords are as follows:`n`n, %TEMP%\Results.txt ; Create first line of new Results.txt file

; ***** Export profiles *****
RunWait, %comspec% /c "netsh wlan export profile folder=%TEMP% key=clear",, hide ; Exports all WiFi profiles
;Run, %TEMP% ; Used for testing

; ***** Loop through generated files *****
FileList =  ; Initialize to be blank
Loop, %TEMP%\*.xml ; Loop through the XML files
    FileList = %FileList%%A_LoopFileName%`n ; Generate a filelist
Sort, FileList, ; Sort the filelist alphabetically

Loop, parse, FileList, `n ; Begin parsing files in filelist
{
    if A_LoopField =  ; Ignore the blank item at the end of the list
        continue
    
FileReadLine, str, %TEMP%\%A_LoopField%, 22 ; Read line 22 of each XML file

RegexMatch(str, "<keyMaterial>(.+)</keyMaterial>", pass) ; Use RegEx to remove extraneous characters

Result = "%A_LoopField%" = "%pass1%"`n ; Store result in variable
FileAppend, %Result%, %TEMP%\Results.txt ; Append each result to the Results.txt file
}

FileDelete, %TEMP%\*.xml ; Delete the temporary XML files
FileAppend, `nThis file is stored in %TEMP%`nand will be overwritten if you run this again., %TEMP%\Results.txt ; Append final lines to the Results.txt file

Run, %TEMP%\Results.txt ; Pop the results in the handler for text files

ExitApp ; Exit the script
Edit: Check my Dec. 8th post further down for a MUCH better version.
Last edited by RickC on 08 Dec 2016, 13:30, edited 1 time in total.
User avatar
DataLife
Posts: 326
Joined: 29 Sep 2013, 19:52

Re: Show WiFi password

31 Oct 2016, 10:01

Very nice
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
ozzii
Posts: 325
Joined: 30 Oct 2013, 06:04

Re: Show WiFi password

01 Nov 2016, 04:22

Hi,
If I may a suggestion:
Don't use FileDelete, %TEMP%\*.xml
What is in the TEMP folder there is some xml files from another app!?

Maybe better to have the result in a msgbox or better in an edit box so the copy of the informations can be copied easier.
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

03 Nov 2016, 23:24

It's up to you. That's why I posted the code. Do with it whatever you want.
aaffe
Posts: 154
Joined: 16 Jan 2014, 04:23

Re: Show WiFi password

04 Nov 2016, 05:05

You could store your XMLs e.g. in %Temp%\WifiXMLS\*.xml
Then you can delete all in this folder without danger to delete xmls from other programs.
garry
Posts: 1885
Joined: 22 Dec 2013, 12:50

Re: Show WiFi password

04 Nov 2016, 14:14

example creates in scriptdir one folder with xml-file and see result in msgbox

Code: Select all

;-------- https://autohotkey.com/boards/viewtopic.php?f=6&t=24202 ---
setworkingdir,%a_scriptdir%
If Not A_IsAdmin
 {
 Run *RunAs "%A_ScriptFullPath%"
 ExitApp
 }

fd=%a_scriptdir%\WifiXMLS
ifnotexist,%fd%
  filecreatedir,%fd%

RunWait, %comspec% /c "netsh wlan export profile folder=%fd% key=clear",, hide  ;- Exports all WiFi profile

Loop, %fd%\*.xml
  {
  aac:=""
  y:=A_LoopFileFullPath           ;- this is a xml-file in folder above
  fileread,aac,%y%                ;- read txt-file to memory
  Loop,parse,aac,`n,`r            ;- parse each line by `n ascii-10
    {
    x:= A_LoopField               ;- line in xml-file
    if x contains <name>
       L1:=RegExReplace( x, "<.*?>" )
    if x contains <keyMaterial>
       {
       L2:=RegExReplace( x, "<.*?>" )
       L1=%L1%
       L2=%L2%
       e4 .= "SSID=" . L1 "`nPassword=" . L2 . "`nXML-File=" . y . "`n----------------`n"
       }
    }
  }
msgbox,%e4%
exitapp
;===================================================================
or this , creates only xml-file

Code: Select all

;-------- https://autohotkey.com/boards/viewtopic.php?f=6&t=24202 ---
setworkingdir,%a_scriptdir%
RunWait, %comspec% /c "netsh wlan export profile folder=. key=clear",, hide  ;- Exports all WiFi profile
Loop, %A_SCRIPTDIR%\*.xml
  {
  aac:=""
  y:=A_LoopFileFullPath           ;- this is a xml-file in folder above
  fileread,aac,%y%                ;- read txt-file to memory
  Loop,parse,aac,`n,`r            ;- parse each line by `n ascii-10 (EndOfLine ascii 13,10 )
    {
    x:= A_LoopField               ;- line in text file
    if x contains <name>
       L1:=RegExReplace( x, "<.*?>" )
    if x contains <keyMaterial>
       {
       L2:=RegExReplace( x, "<.*?>" )
       L1=%L1%
       L2=%L2%
       e4 .= "SSID=" . L1 "`nPassword=" . L2 . "`nXML-File=" . y . "`n----------------`n"
       }
    }
  }
msgbox,%e4%
exitapp
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

05 Nov 2016, 12:47

garry wrote:example creates in scriptdir one folder with xml-file and see result in msgbox
Hi Garry, Thanks for the suggestions but unfortunately neither work accurately. I have a test laptop with 14 stored profiles. Your scripts work correctly for the first 2 stored profiles then, for the rest, show the wrong SSID (of an SSID which IS available but which hasn't been connected to, i.e. is not stored). (I used a TXT file because a MsgBox is impractical when some of the results appear off-screen.)

Image
garry
Posts: 1885
Joined: 22 Dec 2013, 12:50

Re: Show WiFi password

05 Nov 2016, 14:34

sorry I have only one profile wlan
wanted just avoid to delete all xml-files in folder %temp%
another try , which I can't test ( because I have only one profile wlan )
will be create for each profile a new xml-file ?

Code: Select all

;-------- https://autohotkey.com/boards/viewtopic.php?f=6&t=24202 ---

setworkingdir,%a_scriptdir%
fd=%a_scriptdir%\WifiXMLS
ifnotexist,%fd%
  filecreatedir,%fd%

RunWait, %comspec% /c "netsh wlan export profile folder=%fd% key=clear",, hide  ;- Exports all WiFi profile

Loop, %fd%\*.xml
  {
  aac:=""
  y:=A_LoopFileFullPath           ;- this is a xml-file in folder above
  fileread,aac,%y%                ;- read txt-file to memory
  Loop,parse,aac,`n,`r            ;- parse each line by `n ascii-10 (EndOfLine ascii 13,10 )
    {
    x:= A_LoopField               ;- line in text file
    if x contains <name>
       {
       L%a_index%:=RegExReplace( x, "<.*?>" )
       z1:= % L%a_index%
       }
    if x contains <keyMaterial>
       {
       L%a_index%:=RegExReplace( x, "<.*?>" )
       z2:= % L%a_index%
       z1=%z1%
       z2=%z2%
       e4 .= "SSID=" . Z1 "`nPassword=" . Z2 . "`nXML-File=" . y . "`n----------------`n"
       ;break
       }
    }
  }
msgbox,%e4%
fileappend,%e4%,test55.txt
run,test55.txt
exitapp
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

05 Nov 2016, 15:32

garry wrote:sorry I have only one profile wlan
wanted just avoid to delete all xml-files in folder %temp%
another try , which I can't test ( because I have only one profile wlan )
will be create for each profile a new xml-file ?
No apologies needed. Your usage of RegExReplace is far more complex than my very simple use of RegexMatch (first time I've ever used RegEx) and I'm lost. Any chance of some more comments so I can try to understand? :)

Unfortunately, whilst the TXT file is useful in addition to the MsgBox, I'm afraid only the first 2 results are accurate again. It's pulling the 'FreeInternet-5G' SSID from somewhere then duplicating it again for the rest of the results, same as my previous screenshot. I don't understand this... because that SSID is not even being picked up by my laptop at the moment (which I think is a Win 10 bug) nor does it show if I run this:

Code: Select all

RunWait, %comspec% /c "netsh wlan show profiles > %TEMP%\profiles.txt",, hide ; Run NETSH and pipe results to file
Run, %TEMP%\profiles.txt
(I only had 1 profile as well so had to set up a test router and mock up a load of test wlan profiles to import and test against. :) )
garry
Posts: 1885
Joined: 22 Dec 2013, 12:50

Re: Show WiFi password

06 Nov 2016, 07:17

I get with netsh command 1 file = WiFi-athome99.xml
script above saves 2n'd name <name>athome99</name>
and then password <keyMaterial>athome9912345</keyMaterial>
loop in different xml-files if exist

Code: Select all

setworkingdir,%a_scriptdir%
fd=%a_scriptdir%\WifiXMLS
ifnotexist,%fd%
  filecreatedir,%fd%
RunWait, %comspec% /c "netsh wlan export profile folder=%fd% key=clear",, hide
return

;netsh creates this file :
;     WiFi-athome99.xml

/*
<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
	<name>athome99</name>
	<SSIDConfig>
		<SSID>
			<hex>6174686F6D653332</hex>
			<name>athome99</name>
		</SSID>
	</SSIDConfig>
	<connectionType>ESS</connectionType>
	<connectionMode>auto</connectionMode>
	<MSM>
		<security>
			<authEncryption>
				<authentication>WPA2PSK</authentication>
				<encryption>AES</encryption>
				<useOneX>false</useOneX>
			</authEncryption>
			<sharedKey>
				<keyType>passPhrase</keyType>
				<protected>false</protected>
				<keyMaterial>athome9912345</keyMaterial>
			</sharedKey>
		</security>
	</MSM>
	<MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
		<enableRandomization>false</enableRandomization>
	</MacRandomization>
</WLANProfile>
*/
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

08 Dec 2016, 13:26

garry wrote:I get with netsh command 1 file = WiFi-athome99.xml
script above saves 2n'd name <name>athome99</name>
and then password <keyMaterial>athome9912345</keyMaterial>
loop in different xml-files if exist
A big thank you to you, garry, for showing me the way to go, especially in the use of FileRead and parsing the entire file looking for criteria instead of using FileReadLine, which didn't work consistently. :bravo:

I'm happy that the following now does exactly what I want, avoids the problem of profiles with no passwords and is a much better script than my first or second attempts.

Code: Select all

; https://autohotkey.com/boards/viewtopic.php?f=6&t=24202
; Note: Does not work with Windows XP due to lack of 'wlan' sub-context (nor 'export')
; Should work with Windows Vista onwards but only test with Windows 10

#SingleInstance force ; Force only one instance at a time#SingleInstance force

; Prompt to 'Run as Admin', i.e. show UAC dialog
If Not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

; ***** Housekeeping *****
SetWorkingDir, %A_ScriptDir%
FilesDir=%A_ScriptDir%\WifiXMLS

IfNotExist,%FilesDir%
  FileCreateDir,%FilesDir%
  
FileDelete, %FilesDir%\*.xml        ; Make sure there are no existing XML files
IfExist Results.txt                 ; Make sure there is no existing Results.txt file
    FileDelete, Results.txt    

FileAppend, Stored WiFi passwords are as follows:`n`n, Results.txt ; Create first line of new Results.txt file

; ***** Export profiles *****
RunWait, %comspec% /c "netsh wlan export profile folder=%FilesDir% key=clear",, hide  ; Exports all WiFi profiles

; ***** Loop through/parse generated files *****

FileList =  ; Initialize to be blank
Loop, %FilesDir%\*.xml ; Loop through the XML files
    FileList = %FileList%%A_LoopFileName%`n ; Generate a filelist
Sort, FileList, ; Sort the filelist alphabetically

Loop, %FilesDir%\*.xml              ; Loop through each file
{
  string:=""                        ; Store contents of file in variable
  xmlfile:=A_LoopFileFullPath       ; With each file, with its path
  FileRead, string, %xmlfile%       ; ... read each file into memory
  Loop, parse, string, `n, `r       ; Parse each line using LineFeed (`n) and Carriage Return (`r)
   {
   lines:= A_LoopField  `           ; Store lines in variable
   if lines contains <name>         ; Check lines for 1st criteria
      {
      L%a_index%:=RegExReplace( lines, "<.*?>" )
      ssid:= % L%a_index%           ; Store search result in variable
      }
       
   if lines contains <authentication>   ; Check lines for 2nd criteria
      {
      L%a_index%:=RegExReplace( lines, "<.*?>" )
      auth:= % L%a_index%           ; Store search result in variable
      }

   if lines contains <encryption>   ; Check lines for 3rd criteria
       {
       L%a_index%:=RegExReplace( lines, "<.*?>" )
       crypt:= % L%a_index%         ; Store search result in variable
       }

   if lines contains <keyMaterial>  ; Check lines for 4th criteria
      {
      L%a_index%:=RegExReplace( lines, "<.*?>" )
      password:= % L%a_index%       ; Store search result in variable
      
      ssid=%ssid%                   ; Keep just the data between <name> and </name>
      auth=%auth%                   ; Keep just the data between <authentication> and </authentication>
      crypt=%crypt%                 ; Keep just the data between <encryption> and </encryption>
      password=%password%           ; Keep just the data between <keyMaterial> and </keyMaterial>
       
      resultbasic .= "XML profile:"A_Tab . xmlfile . "`nSSID:"A_Tab A_Tab . ssid "`nPassword:"A_Tab . password . "`n---------------------------------------------`n"
      resultverbose .= "XML profile:"A_Tab . xmlfile . "`nSSID:"A_Tab A_Tab . ssid "`nPassword:"A_Tab . password . "`nAuthentication:"A_Tab . auth . "`nEncryption:"A_Tab . crypt . "`n---------------------------------------------`n"
      ; Break                         ; Used for testing
      }
   }
}

; ***** Display a message box, with custom button names, offering a choice of info *****
SetTimer, ChangeButtonNames, 50 
MsgBox, 36, WiFi Profile Info, What info would you like?`n`nBasic, i.e. show just passwords`nVerbose, i.e. show passwords and security`n`nChoose a button...

IfMsgBox, YES 
   {
   FileAppend, %resultbasic%, results.txt   ; Write the basic results to the text file
   FileAppend, `nNote: Only wireless access points with passwords are listed above.`n, Results.txt ; Create last line of new Results.txt file
   Run, results.txt                    ; Open the file in whatever app is registered to display text files
   ExitApp         ; Exit the script
   }
else 
   {
   FileAppend, %resultverbose%, results.txt   ; Write the verbose results to the text file
   FileAppend, `nNote: Only wireless access points with passwords are listed above.`n, Results.txt ; Create last line of new Results.txt file
   Run, results.txt                    ; Open the file in whatever app is registered to display text files
   ExitApp         ; Exit the script
   }
return 

ChangeButtonNames: 
IfWinNotExist, WiFi Profile Info
    return  ; Keep waiting.
SetTimer, ChangeButtonNames, off 
WinActivate 
ControlSetText, Button1, &Basic 
ControlSetText, Button2, &Verbose 
return

Esc::ExitApp    ; Used to cancel the MsgBox, if needed
Last edited by RickC on 10 Dec 2016, 12:40, edited 3 times in total.
garry
Posts: 1885
Joined: 22 Dec 2013, 12:50

Re: Show WiFi password

08 Dec 2016, 17:00

thank you, RickC , works fine ( Windows-10 )
an interesting msgbox in your script ( can create also a 2nd-GUI with many buttons if needed )
RickC
Posts: 220
Joined: 27 Oct 2013, 08:32

Re: Show WiFi password

08 Dec 2016, 17:25

garry wrote:thank you, RickC , works fine ( Windows-10 )
an interesting msgbox in your script ( can create also a 2nd-GUI with many buttons if needed )
Thank YOU... your suggested solution turned out to be a much better and far more flexible solution than my own attempts, so I'm very grateful for the time you put in to coming up with a more efficient method. :)

(The msgbox was from the AHK documentation (https://autohotkey.com/docs/scripts/Msg ... nNames.htm) which I just adapted to my needs...)
sGuest

Re: Show WiFi password

09 Dec 2016, 01:33

:arrow: latest version does not list anything for me.
garry
Posts: 1885
Joined: 22 Dec 2013, 12:50

Re: Show WiFi password

09 Dec 2016, 04:27

also not works with XP ( had success with WIN-10 ) , see netsh help for parameters

Code: Select all

setworkingdir,%a_scriptdir%
RunWait, %comspec% /k netsh /?
return
should create an xml-file in folder 'fd' ( WifiXMLS )

Code: Select all

fd=%a_scriptdir%\WifiXMLS
ifnotexist,%fd%
  filecreatedir,%fd%
RunWait, %comspec% /k netsh wlan export profile folder=%fd% key=clear,,
return

Return to “Scripts and Functions”

Who is online

Users browsing this forum: AHK_user, Antoine, burque505, guest3456 and 48 guests