Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Adding user interface in batch programme

09 Nov 2014   #1
swapnil007

Windows 8 ultimate 32 bit
 
 
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 . . .


My System SpecsSystem Spec
.
09 Nov 2014   #2
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

The Choice command is what you want (minus the clickable buttons part). Feel free to ask for further guidance or for an example of how you may set this up in you script.
My System SpecsSystem Spec
Reply

 Adding user interface in batch programme




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Renaming Win 7 Pro admin [only user] or adding new user & hiding 1st.
My 2nd wife has a Toshiba Win7 Pro, 64 bit, Satellite notebook, never in a domain. I originally set her up as Admin with no additional users. We want to change or hide her account while adding new admin account before sending/giving pc to my son who would not accept it with her info obviously on...
General Discussion
User Interface Failure
After updating Windows 7 XP mode on 12/26/12, Update Restart hung on Log-off. Now it gives User Interface Failure message when restarting XP Mode. The message reads: "You cannot initiate Remote Desktop Connection because the Windows logon software on the remote computer has been replaced by...
Virtualization
Windows 8 User Interface
Friend sent this my way today, I found it funny. http://i211.photobucket.com/albums/bb180/pparks1/AOL-VS-Windows8.png
Chillout Room
Windows 7 User interface crashing
Hey, please can anyone help me?! My windows 7 has suddenly started crashing, sometimes randomly, and always when i right click. it won't let me use firefox or internet explorer but i did manage to get on internet explorer but not by using a link on a help page. It also keeps saying that...
BSOD Help and Support
OS User Interface question
I know some of these are done in a Linux Gui. I am trying to make a nice user interface for my kitchen PC. The user portal I am trying to get is something like "]http://www.hp.com/united-states/campaigns/mini1000/index.html#/Main/ or ...
Software
Windows 7's User Interface
A First Look At Windows 7's User Interface. At PDC today, Microsoft gave the first public demonstration of Windows 7. Until now, the company has been uncharacteristically secretive about its new OS; over the past few months, Microsoft has let on that the taskbar will undergo a number of...
News


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:23.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App