New
#1
Adding user interface in batch programme
I have this code.
@ECHO OFF
:Values
SET strSSID=
SET strPWD=
ECHO Please enter the ssid:
SET /p strSSID=SSID:
ECHO.
ECHO Please enter the password:
SET /p strPWD=Password:
IF ".%strSSID%"=="." GOTO :TryAgain
IF ".%strPWD%"=="." GOTO :TryAgain
CALL :HostedNW "%strSSID%" "%strPWD%"
pause
GOTO :EOF
:HostedNW
ECHO
C:\Windows\System32\netsh.exe wlan set hostednetwor mode=allow ssid="%~1" key="%~2" keyUsage=persistent
SET strSSID=
SET strPWD=
GOTO :EOF
:TryAgain
CLS
ECHO.
ECHO One or more inputs weren't correct.
ECHO Please try again.
ECHO.
GOTO :Values
In which I have taken the proper inputs from user as SSID and PASSWORD, Now I have second code as:
C:\Windows\System32\netsh.exe wlan start hostednetwork
This code will turn ON the WiFi, and another code which is :
C:\Windows\System32\netsh.exe wlan stop hostednetwork
This code will turn OFF the WiFi.
Now I want all these codes in one codding format and wanted to display a proper user interface in which:
first clickable button will show "Configure WiFi"
second clickable button will show "Turn ON"
third clickable button will show "Turn Off"
fourth clickable button will exit the user interface.
and the respective buttons will run the respective code designed for it in same manner as mentioned above.
If possible suggest me how to improve the user interface of this file.
Please Help Me With This Problem . . .