Difference between revisions of "Accessing MEMDISK arguments from DOS"
From Syslinux Wiki
m (Acessing MEMDISK arguments from DOS moved to Accessing MEMDISK arguments from DOS: Fix typo) |
m (Category added) |
||
Line 1: | Line 1: | ||
+ | [[Category:Configuration]] | ||
+ | [[Category:MEMDISK]] | ||
+ | |||
Many times it is very useful to be able to access the command line arguments given to [[MEMDISK]] from within the DOS image. This would allow one to combine several DOS images into one, by executing different scripts depending on the arguments. SYSLINUX provides this information via an API. Add ''getargs.com'' from http://people.cs.uchicago.edu/~gmurali/gui/downloads.html to your DOS image and use it as follows inside any of your .BAT files. | Many times it is very useful to be able to access the command line arguments given to [[MEMDISK]] from within the DOS image. This would allow one to combine several DOS images into one, by executing different scripts depending on the arguments. SYSLINUX provides this information via an API. Add ''getargs.com'' from http://people.cs.uchicago.edu/~gmurali/gui/downloads.html to your DOS image and use it as follows inside any of your .BAT files. | ||
Revision as of 13:26, 7 July 2010
Many times it is very useful to be able to access the command line arguments given to MEMDISK from within the DOS image. This would allow one to combine several DOS images into one, by executing different scripts depending on the arguments. SYSLINUX provides this information via an API. Add getargs.com from http://people.cs.uchicago.edu/~gmurali/gui/downloads.html to your DOS image and use it as follows inside any of your .BAT files.
getargs.com > settings.BAT settings.BAT
If the call to MEMDISK was
memdisk initrd=my_dos.img ACTION=install NETSHARE=sharename
then after the call to settings.BAT the environment variables INITRD, ACTION and NETSHARE will be set to my_dos.img, install and sharename respectively.