Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Michael
I ended up using a combination the some menu items in FDCONFIG.SYS which in turn
launch batch scripts that use the CHOICE command. Works great. Thanks for
everyone's help.


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Bernd Blaauw
Op 26-1-2012 20:12, Michael schreef:

> I'm already somewhat familiar with syslinux, but the commands I use must run
> from FreeDos, does syslinux let me do that?

Only in the form of workarounds. The MEMDISK module allows to specify a 
commandline, just as in GNU/Linux distributions. Syslinux contains a 
MDISKCHK program to retrieve these parameters. The output of thus 
program can be redirected to a batchfile which then can be 
executed/called to add these parameters to the DOS environment.

The requirement of using MEMDISK and a (floppy)disk image is annoying 
though, so you might want to stick to batchfiles instead.

Above described method is implemented in the FDBOOT.IMG floppy image 
file inside the FreeDOS 1.1 CD-ROM distribution. Maybe also in UBCD 
(Ultimate BootCD) project.

Additionally some custom versions of FreeDOS kernel 2040 can read 
MEMDISK parameters. That way you can supply your own lines for 
config.sys. It's done by the FD={yourlinehere}{and-so-on} parameter.

One example for it would be:

# test1
label test1
linux memdisk
initrd fdboot.img
append FD={SHELL=COMMAND.COM /P=TEST1.BAT}

# test2
label test2
linux memdisk
initrd fdboot.img
append FD={SHELL=COMMAND.COM /P=TEST2.BAT}


FreeDOS bootCD has something like this in isolinux.cfg file:
# experiment with USB
label usb
linux memdisk
initrd=fdboot.img
append USB=U

while autoexec.bat has something like:

@echo off
rem load ramdisk to redirect output to file
devload tdsk.exe
tdsk 100
rem get memdisk parameters
mdiskchk -b > R:\ARGS.BAT
rem add to environment
call R:\ARGS.BAT
rem load USB stack driver..if present!
if not exist a:\usb\dosusb.* goto end
A:\USB2\DOSUSB /E
rem load USB disk driver, at drive U:
DEVLOAD /D%USB% A:\USB2\USBDRIVE.SYS
goto end
:end

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Michael
Bernd Blaauw  home.nl> writes:

> 

> 
> As for the menu, I'd indeed suggest using a batchfile.
> Alternatively, maybe the Syslinux menu system is worthwile, you can see 
> it in action in for example PartedMagic (LiveCD)
> 
> Documentation at:
> http://www.syslinux.org/wiki/index.php/Comboot/menu.c32
> 


I'm already somewhat familiar with syslinux, but the commands I use must run
from FreeDos, does syslinux let me do that?



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Bernd Blaauw
Op 26-1-2012 19:17, Michael schreef:
> Perfect. Thanks Jeffrey and Bret, for the suggestions and code.
> It looks like it should work for our environment.
> I'll go ahead and modify it and see how it goes.

Your situation might be a perfect occasion to experiment with the 
'flashrom' tool (www.flashrom.org). However, do keep your vendor 
flashing programs available :)
DMIDECODE also still needs to be present it seems (rename to dmidecod.exe)

Flashrom binary  at : http://ra.openbios.org/~idwer/flashrom/
DMIdecode binary at : http://www.bttr-software.de/ports/

As for the menu, I'd indeed suggest using a batchfile.
Alternatively, maybe the Syslinux menu system is worthwile, you can see 
it in action in for example PartedMagic (LiveCD)

Documentation at:
http://www.syslinux.org/wiki/index.php/Comboot/menu.c32






--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Michael
Perfect. Thanks Jeffrey and Bret, for the suggestions and code. 
It looks like it should work for our environment.
I'll go ahead and modify it and see how it goes. 







--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread dmccunney
On Thu, Jan 26, 2012 at 10:44 AM, Bret Johnson  wrote:

> Anyway, here it is (kind of long).  I can also send it as an e-mail 
> attachment if anyone cares.

Probably a good idea in any case. It shows by default in GMail will
all line breaks stripped out.

For anyone viewing the list in GMail, click the down symbol next to
the Reply button, and choose Show Original.  That will display the
batch file with formatting/indentation preserved, and it can be
copied/pasted into an editor.
__
Dennis

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] Using a menu for many options

2012-01-26 Thread Bret Johnson
As an extension to what Jeffrey suggested, at one time I used a simple batch 
file with some of my utilities, along with CHOICE and ANSI, to set up a menu of 
commonly used applications.  I don't use it any more, but following is the 
latest version I was using.  It allows up to 36 options (26 letters and 10 
numbers).

It uses ANSI to highlight the choices in the menu, CHOICE to handle the 
keyboard input, my SCANCODE program to automatically pick a menu choice after a 
timeout, and my MOUSKEYS program to allow selection with a mouse instead of 
just using the keyboard (incidentally, all of the hidden asterisks are there to 
allow you select the menu item with the mouse from anywhere on the menu line).  
It also uses an unreleased program of mine called ISLOADED to detect whether or 
not ANSI.SYS (or some equivalent) is installed and if the screen is color or 
monochrome.  You can manipulate the batch file however you want.

You can download SCANCODE and MOUSKEYS from my web site (http:/bretjohnson.us), 
and I can send you ISLOADED if you want it as well (ISLOADED is currently 
unfinished and undocumented).  For what you're doing, though, I think you could 
manage without any of those.

I know there are also programs specifically designed for menu selection, but 
doing it with a simple batch file and some free utilities always seemed like a 
more flexible option to me.

Anyway, here it is (kind of long).  I can also send it as an e-mail attachment 
if anyone cares.

  @ECHO %Eco%
  CALL SetMouse

:MouseOK
  %DOSDrive%
  CD\
  CALL 25x80
  LH MousKeys
  ScanCode W 13,42 "S - Screen", Idle 120, Only 0.1, W 13,42 "S - Screen", Z, D 
0.3, "s", Z-, R
  IsLoaded Ansi > NUL
  IF ErrorLevel 1 GOTO NoANSI
  IsLoaded Color > NUL
  IF ErrorLevel 1 GOTO Mono

:Color
  SET Text=[0;37;44m
  SET FKey=[1;31;44m
  SET Hide=[0;34;44m
  GOTO Start

:Mono
  SET Text=[0;37;40m
  SET FKey=[1;37;40m
  SET Hide=[0;30;30m

:Start
  CLS
  ECHO.
  ECHO%FKey%1%Text% %Hide%
%FKey%6%Text% - File Wizard %Hide%*
  ECHO%FKey%2%Text% %Hide%
%FKey%7%Text% %Hide%***
  ECHO%FKey%3%Text% - Virus Scan (F-PROT) %Hide%**
%FKey%8%Text% %Hide%***
  ECHO%FKey%4%Text% - WordPerfect %Hide%**
%FKey%9%Text% %Hide%***
  ECHO%FKey%5%Text% %Hide%
%FKey%0%Text% - QUIT %Hide%
  ECHO.
  ECHO%FKey%A%Text% %Hide%
%FKey%N%Text% - Norton Utilities %Hide%
  ECHO%FKey%B%Text% - Bingo (Text Editor) %Hide%**
%FKey%O%Text% %Hide%***
  ECHO%FKey%C%Text% %Hide%
%FKey%P%Text% - Procomm Plus %Hide%
  ECHO%FKey%D%Text% %Hide%
%FKey%Q%Text% - QUIT %Hide%
  ECHO%FKey%E%Text% - Edit text (TED) %Hide%**
%FKey%R%Text% - Reboot the Computer %Hide%*
  ECHO%FKey%F%Text% %Hide%
%FKey%S%Text% - Screen Saver (Dazzle) %Hide%***
  ECHO%FKey%G%Text% - Games %Hide%
%FKey%T%Text% - Set the Time %Hide%
  ECHO%FKey%H%Text% %Hide%
%FKey%U%Text% - USA Atlas %Hide%***
  ECHO%FKey%I%Text% - Interrupt Helper %Hide%*
%FKey%V%Text% - View some pictures %Hide%**
  ECHO%FKey%J%Text% %Hide%
%FKey%W%Text% - World Atlas %Hide%*
  ECHO%FKey%K%Text% %Hide%
%FKey%X%Text% - QUIT %Hide%
  ECHO%FKey%L%Text% %Hide%
%FKey%Y%Text% %Hide%***
  ECHO%FKey%M%Text% - Money Counts %Hide%*
%FKey%Z%Text% %Hide%***
  ECHO.
  ECHO.
  ECHO %Text%   Your Selection?(Q, X, or 0 to QUIT)
  ECHO.

  CHOICE /N /C:1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ
REM Errorlevel 01122333
REM123456789012345678901234567890123456

IF ErrorLevel 37 GOTO Stop
IF ErrorLevel 36 GOTO Z
IF ErrorLevel 35 GOTO Y
IF ErrorLevel 34 GOTO X
IF ErrorLevel 33 GOTO W
IF ErrorLevel 32 GOTO V
IF ErrorLevel 31 GOTO U
IF ErrorLevel 30 GOTO T
IF ErrorLevel 29 GOTO S
IF ErrorLevel 28 GOTO R
IF ErrorLevel 27 GOTO Q
IF ErrorLevel 26 GOTO P
IF ErrorLevel 25 GOTO O
IF ErrorLevel 24 GOTO N
IF ErrorLevel 23 GOTO M
IF ErrorLevel 22 GOTO L
IF ErrorLevel 21 GOTO K
IF ErrorLevel 20 GOTO J
IF ErrorLevel

Re: [Freedos-user] Using a menu for many options

2012-01-25 Thread Jeffrey
Hi Micheal,

> I'd like to get some recommendations of how to work around this, either within
> FDCINFIG.SYS or some combination of this and other files. The goal is to 
> present
> a menu with the complete list of image types (or some way of drilling down 
> into
> these items) and it's easy for the user to choose the correct one and it will
> automatically run the appropriate command.
Are you using FDAUTO.BAT? You could use the choice command
for example

Choice /C:0123456789abcdef
if "%errorlevel%"=="1" goto option1
else if "%errorlevel%"=="2" goto option2
else if "%errorlevel%"=="3" goto option3
else if "%errorlevel%"=="4" goto option4

option1:

goto end
option2:

goto end

end:

for 16 menu options
Obviously not as convenient as FDCONFIG.SYS menu
Hope this helps,

Jeffrey


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] Using a menu for many options

2012-01-25 Thread Michael
Hello FreeDOS people,

At work I maintain CMOS images for a variety of different types of hardware.
When we have a new server going out the door, we boot up FreeDOS on this machine
and run a utility that flashes the correct image to the BIOS. Up to now, we've
been using the Menu command in FDCONFIG.SYS to maintain the list of images, and
it's an easy matter of selecting the correct server type and away we go.

But the number of different images has been increasing and I seem to have run
into a limit of 10 items (0-9) for the menu system.

I'd like to get some recommendations of how to work around this, either within
FDCINFIG.SYS or some combination of this and other files. The goal is to present
a menu with the complete list of image types (or some way of drilling down into
these items) and it's easy for the user to choose the correct one and it will
automatically run the appropriate command.

Suggestions?

 


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user