The following code works fine when the name of the saved wifi profile is one word or has no spaces.
"Belkin" works,
"Belkin.536.guests" works,
"My Network" does not work,
Error is: "There is no such wireless interface on the system."
I have about 15 network profiles on my computer and the only ones that do not cooperate with the code have a space in them. The "ECHO" command works every time correctly so I can see that the variable looks correct.
NETSH WLAN SHOW PROFILES
SET/P "PROFILE=Enter Profile Name : "
ECHO Showing Info For : %PROFILE%
NETSH WLAN SHOW PROFILES NAME=%PROFILE% key=clear
Please tell me what I am doing wrong.
NETSH WLAN SHOW PROFILES NAME="%PROFILE%"