I'm trying to get the wifi password with a batch file but one command is not being read correctly (my interpretation).
Netsh WLAN show profile name= %WifiName% key='clear'
turns into
Netsh WLAN show profile name= %WifiName% key 'clear'
when run in
for /f "tokens=*" %%i in ('Netsh WLAN show profile name= %WifiName% key="clear"') do ^
echo "%%i"
If you need more information ill give it but I'm too stupid to think of any right now.
entire code
for /f "tokens=5" %%i in ('Netsh WLAN show profile') do ^
set WifiName=%%i
Netsh WLAN show profile name= %WifiName% key='clear'
for /f "tokens=*" %%i in ('Netsh WLAN show profile name= %WifiName% key"=""clear"') do ^
echo "%%i"
pause