Ask a question

Need Help Figuring Out A Batch Menu For Dos

How do i edit a batch file while in the command line?

notepad c:\directory\source-file
edit c:\directory\source-file

though notepad will only work if you have a GUI so if you only have cmd.exe go with edit

@Kind_Lad: that is why i mentioned that it only works in a GUI....sometimes you use terminal emulators while booted into normal mode on windows.

this might be helpful:

i did a little reading and i guess they got rid of the edit command a while back. but all you really need is a text editor that works in command line. for example in linux i use nano.

you might also try the; edlin command

How do I run a Java program using a .bat file in Windows?

I don’t know why you need .bat for this. Maybe you have a command line program and you just want to execute the program on command line instead of eclipse. If this is what you wanna do then you can export you project from eclipse to a executable jar file which will run your program in console when you double click on it.You can export your program from the JAR Export Dialog. Here are the instructions to export in jar from official Eclipse help : Help - Eclipse PlatformCreating a New Runnable JAR FileTo create a new runnable JAR file in the workbench:From the menu bar's File menu, select Export.Expand the Java node and select Runnable JAR file. Click Next.In the Runnable JAR File Specification page, select a 'Java Application' launch configuration to use to create a runnable JAR.In the Export destination field, either type or click Browse to select a location for the JAR file.Select an appropriate library handling strategy.Optionally, you can also create an ANT script to quickly regenerate a previously created runnable JAR file.One more thing, If your program just opens, executes some code, and completes execution then maybe console will just appear and disappear and you won’t be able so see anything. What you can do to solve this is at the end of the program you can wait for the user to press a key. After the use press the key, the program will terminate.EDIT : For running the program from .bat file, you do have to follow above steps. After that create a new file in notepad, type the command “java -jar path_to_jar_file.jar” without quotes and replace path_to_jar_file.jar with the absolute path of your jar file or if the jar file is in the same directory as the .bat file then you can use relative path and enter only the file_name.jar instead of full path. After that save it with an extension .bat selecting file type as all files and you’ll get a .bat file which on clicking will open that jar file.

Text for a batch file to run msconfig?

Create a new text file and in that text file, type (without quotes) "msconfig" (hit enter)
Save the file on your desktop (ie. msconfig.txt)
Go to the file and change the file to a batch file (ie. msconfig.bat).

Now all you have to do is double-click on the icon to open the msconfig menu.

EDIT: You may have to open "My Computer" and uncheck the file options to "hide extensions of known file types" before you can change the extension.

Before the invention of GUI (with desktop with icons, start menu etc.) for modern computers, how did using the computer look like? Was it all in Shell/Command Prompt?

This depends, but in general although shell/command prompt interfaces were common (on home computers, DOS, CP/M, etc were common), they weren’t the only option. The were some fairly sophisticated smart console interfaces that had sub-menus/primitive windows; in many of them you’d have a menu across the top and other things that are familiar to modern GUI users, sometimes even with mouse support:And of course there were early text-mode word processors and spreadsheets:Of course, those required smart consoles (vt100 and the like). A dumb terminal/glass TTY lacked the addressable cursor needed to use such interfaces, but could do a batch menu-type interface (which was also common on DOS machines as it was trivial for even a smart teenager to design one):And if you go back further, even a dumb terminal wasn’t always available; earlier machines often had a paper TTY:And of course, even that keyboard interface was a relative luxury compared to predecessors, which might have only a punch card interface or even require manual manipulation of relays, cables, etc:

How can I check my HP laptop's serial number?

Search Windows for CMD.EXE, and open Command Prompt from the search results.A command window opens.At the command prompt, type wmic bios get serialnumber , and then press Enter.Hope that helps you out!