Man kan bruge kommandoen choice til at spørge brugeren choice sætter errorlevel, der så kan checkes i en if ... Ikke alle windows versioner har choice.
jeg er ved at lave en bootbar CD rom, som indholder GDISK.exe til at slette partitioner med og oprette dem med, og en Ghost fil med min Win XP, som er syspreppet.
jeg kan få CDén til at loade med en start diskette ved at brænde den i Nero, og jeg kan også få den til at starte med en menu, men hvordea den menu skal skrives kan jeg ikke huske.
> -bom- Undskyld, jeg glemte at Windows 9x har en speciel måde at lave menu'er på i autoexec (har aldrig brugt Win9x). Men det er tilsyneladende en hemmelighed om det er Win9x.
Ved ikke om der er noget her, fandt lige en gammel txt den søger stadig på min server.
Multiconfig
Multiconfig designs a multiple configuration selection menu from which you can choose a specific configuration to boot you computer.
Examples
In the following example, three separate menu items are configured for three different individuals. The [menuitem] block lists the options for each individual. In addition, [common] defines system configuration items common to all users. The [submenu] option automatically invokes hard disk maintenance utilities:
[Menudefault]=Greg, 10
[Menu] menuitem=Greg menuitem=Debbie menuitem=Babette submenu Maintenance, Set Up For System Maintenance
When DOS recognizes that muliple configurations have been established, an enviroment variable called config is then in effect. Combining this enviroment variable with batch file execution in your Autoexec.bat file gives you a powerful capability to precisely define what program or programs are run for each individual [Menuitem].
For example, if Greg has selected his own [Menu] choice when the system boots, the enviroment variable Config holds the menu choice "Greg". If you wanted Greg to be able to boot directly into Windows, you could set up your Autoexec.bat file to test for the Config enviroment variable and then act on the variable's contents, as shown in the following example:
@Echo off Cls Path c:\dos;c:\windows;c:\utils; Goto %Config% :Greg win /3 goto end :Debbie c:\word\word goto end :Babette c:\quicken\qb goto end :Maintenance c:\pctools\compress goto end :end cls
Notes
DOS allows up to nine [Menu] items per menu. Use the [Submenu] option if you need more menu items.
You can use up to 70 characters to title a [Menuitem] block on you menu. Do not use forward and backward slashes, semicolons, equal signs, or square brackets in the [Menuitem] names.
Place the [Common] configuration commands at the top of you Config.sys file and define a second empty [Common] block header at the bottom of your Config.sys to prevent problems when installing software, as shown in the previous example. DOS processes commands within [Common] blocks in order, from the top to the bottom of the Config.sys file.
Numlock On and Numlock Off only function in Multiconfig blocks; they do not function at the DOS command line.
If you wanted to create a menu of options to load from the CONFIG.SYS file on startup, you could include a SUBMENU command in place of a MENUITEM command within the main menu. For example, you might want to open a submenu called DEVICES when the third option in the main menu is selected. To do this you would enter the following
[startup] menuitem=minimum, Start with Minimum Configuration menuitem= maximum, Start with Maximum Configuration submenu=devices, Load Devices
The menu options defined in the menu block named DEVICES would be displayed when option three of the main menu was selected. You could return to the main menu by pressing the Backspace key.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.