|
How to create Start Up Menus For Microsoft Windows (95/98) |
|
by Vivek Mohan |
Hi ya ! I really don't know if the whole world already knows how to do this , but I just discovered how to create boot up menus using the config.sys and I just thought I'd share this with you. Any suggestion , comments or anything at all please mail me. Also this topic is for Windows 95/98 , I don't know if the below is the same for Windows 2000 or XP , I did not bother to test. I don't suppose any damage can occur to your computer / software editing the config.sys file as long as you follow the directions correctly.
The Config.Sys file
The config.sys file is in the c:\ of you computer or the active partition where the windows is installed. Go open the drive and see if you can find it , if not its probably hidden. Open the 'View' menu and select 'folder options' and select the 'show all files' in the 'View' tab and you'll see the config.sys file. Now all you have to do is open the file using the notepad or any plain text editor. Save the file as config.sav or any other name , just in case something goes wrong or something important is already written in it. Note that by editing , if any software in your computer is using the file , it will not work as long as you don't restore the file. So you must save it.
Creating the Menu
Now clear all the contents of the file and type in the following..
[menu]
menuitem=MYSHELL
menuitem=WINDOWS
menudefault=WINDOWS,10
[MYSHELL]
REM Just an example
REM So just do nothing but load windows
DEVICE=c:\windows\setver.exe
[WINDOWS]
REM Load windows
DEVICE=c:\windows\setver.exe
Let's just assume that Windows has a config.sys processor.
The [menu] command tell the processor to display a menu.
menuitem=MYSHELL tells the processor that the MYSHELL is a menu item. Similarly menuitem=WINDOWS tells the processor to add another menu item called WINDOWS. Note that the menu items must follow the [MENU] command. You can add more menu items if you want.
menudefault=WINDOWS,10 tells the processor that the menuitem selected by default should be the menuitem WINDOWS. Note that the menuitem specified by menudefault ought to be a defined one. The number 10 after the comma specifies the number of seconds to wait for before the default menuitem is automatically executed. That was all about creating a basic start up menu. But what is more important is to process each of the menu items when selected. That is what the following commands tell.
[MYSHELL] tells the processor that the following commands have to be executed if the user selects MYSHELL from the menu. There are many commands which can be used. I'll just give you a few basic ones. The word REM I've used above stands for remark and is ignored by the processor. It is equivalent to comments used in programming. The DEVICE command loads a device driver to the memory. In this case the device setver.exe is being loaded, required for loading windows. Note that the above will only hold good if windows is installed in c:\windows. Otherwise you'll have to specify the correct directory. [WINDOWS] also tells the processor to execute the same commands if selected.
Note that the general syntax for the DEVICE command is...
DEVICE=[drive:][path]filename [dd-parameters]
There are many other commands like...
INSTALL=[drive:][path]filename [command-parameters] : loads a memory resident programme to memory specified by the path and also runs it.
NUMLOCK=[ON|OFF]: Which sets the numlock to on or off.
SET variable=[string]: Which sets or modifies the MS-DOS environment variables.
SHELL=[[drive:]path]filename [parameters] : Specifies the command interpreter to use instead of command.com . Interesting as it may sound, you can create your own command interpreters and use 'em. (The main reason I found this out !).
You can get more info on these and many other commands in a file config.txt , most probably located in your windows directory.
Lets Try It Out !
Now before trying , I'd like to tell you that there is nothing to worry about if you had saved the config.sys as another file before editing it. If you typed in what I asked you to , no harm will befall your computer and no matter what you select , windows will load and you'll be able to restore everything to the way it was. Further experimentations , and usage of other commands are all under your own risk and in no way am I responsible for any kind of damage to your computer hardware or software. Now you may restart the computer and see how the menu works. If you want to restore the old config.sys , delete the current file and rename the file you saved as config.sys. Have fun...
The author of this document is Vivek Mohan , member of the progcom @ http://compgurux.tripod.com You may copy and distribute this document in whole as long as , you don't use it for profitable purposes and this message is retained.