There are many ways to make menus with a batch script. This depends on how you want the menu to look and the user to interact with it. If you want a text based menu, that would probably be the easiest for you to make and can be done strictly with batch commands. If you want a windows menu popup that a user can click a selection, it's a bit more complicated because it requires the use of VBS (Visual Basic Script).
- Example 1: (MS DOS Only)
But here is a short example that should get you started. Note: you could get a copy of choice.exe from the FreeDOS project and use it instead if you don't have the original choice.com file.
@echo off
Echo Item 1
Echo Item 2
Echo Item 3
Choice Option: /c:123
If errorlevel 3 goto Item3
If errorlevel 2 goto Item2
If errorlevel 1 goto Item1
goto EOF
:Item1
CLS
Echo You chose "Item 1".
Pause
goto EOF
:Item2
CLS
Echo You chose "Item 2".
Pause
goto EOF
:Item3
CLS
Echo You chose "Item 3".
Pause
goto EOF
:EOF
- Example 2: (Without the Choice Command)
@echo off
Echo Item 1
Echo Item 2
Echo Item 3
set /p Item=Choose:
if %item% EQU 1 goto Item1
if %item% EQU 2 goto Item2
if %item% EQU 3 goto Item3
goto :EOF
:Item1
cls
echo You chose "Item 1".
pause
goto :EOF
:Item2
cls
echo You chose "Item 2".
pause
goto :EOF
:Item3
cls
echo You chose "Item 3".
pause
goto :EOF
A Batch. generally in a BATch file.
You can make a batch file from a note pad by saving it as YOURFILENAME.bat. Click on FILE on the menu and choose SAVE AS, then save it as YOURFILENAME.bat.
You can only do it with regetit.exe, and plus if you are asking to change it with a batch file ... trying to make a virus?
Make a batch file. Open up notepad, type in the commands just like you would if you had a C:\prompt and choose "save as." When you save it, remove the .txt extension & use .bat instead. Batch files can be executed just like an .exe, any commands in the batch file are put to a command prompt & executed. So just put the batch file (or a shortcut to it) in programs/startup in your start menu & youre done!
You can't make the batch file automatically open up in fullscreen mode, but you can do this: @echo off mode 800 "Commands here" This will open the batch file in a rather larger-than-normal window, but it will not be in fullscreen, the user of the batch file must click the maximize button to make it fullscreen.
the extension of a batch file is ".bat"
To create a batch file open notepad, textedit, or whatever editor you wish to use. Once open write your program, check for errors, and "make simple text." Save this program as whateveryouwant.bat. Open the file and the batch file will execute.
You can make a folder with batch by using the command: md Foldername Example: @echo off md WikiAnswers exit The batch file would make a folder named WikiAnswers, and it would appear on your desktop
If it says access is denied that means that access is deined, you can't delete it. I think you are probably trying to make a batch file virus to delete system files and is trying to make the batch file delete everything, but came into the access is deined problem.
1. Click on the Start Menu 2. Click on the Run command 3. Type in: cmd 4. Type in: help This should help you a lot with commands. Use: help <command> for details on a certain command. Example: help echo Use the echo command to make the batch file talk. Example is: @echo echo "This is what they will see" Make sure to include the ""s.
Nope, the format of a file is a vital part of a successful batch file. Even if a file with an unknown file format contains working batch file code in it, a batch file will still not be able to read it because of its foreign file extension. If you want the batch file to be able to read the foreign file, then you can set it to rename the mutated file to .bat format and then read it for it to work. Example: @Echo off REN File.Foreign File.bat CALL File.bat exit
A batch file is the text file that contains a series of commands that MS-DOS carries out. A batch file is created by COPY CON command after specifying a file name by using extension as .BAT in DOS mode.