I'm creating a batch to turn my laptop into wifi an make my life easier to type lines in cmd each time.
The trouble is the wifi name always get set to key= insted of the one which I enter.
Here is what I did:
@echo OFF
set /p option="Enter 1 to create wifi, Enter 2 to stop wifi "
IF %option% EQU 1 (
set /p id="Enter wifi Name:"
set /p key="Set password:"
netsh wlan set hostednetwork mode=allow ssid = %id% key = %key%
netsh wlan start hostednetwork
)
IF %option% EQU 2 (
netsh wlan set hostednetwork mode=disallow
)
timeout /t 5