Accessing MEMDISK arguments from DOS
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.