ggyy1221
What you want to do is probably possible--but not exactly the way you state.
You can not have a single bootable optical disc that will first automatically (unattended) create a Ghost image to the disc--and then have it be able to restore that image automatically (unattended)--because you can not have both options in the same autoexec.bat--unless you create a *menu* from which you select either create an image, or restore an image--and once the menu item is selected--that procedure will be carried out.
If you attempt to use Ghost's built-in ability to create a bootable optical disc using Ghost's Windows GUI to set it up, you will not be able to add you own *custom* boot files (i.e. autoexec.bat and config.sys)--Ghost has it's own boot image file that it uses to create the bootable disc--and it loads Ghost, but you will have to perform all Ghost tasks manually once Ghost is loaded.
If you want an automated restore CD, you would need to create the Ghost image, create the custom boot files, and then create a bootable optical disc with your custom boot files + adding the Ghost image file(s) to the data portion of the disc--see here for a basic outline:
Creating Bootable CD/DVD's Without A:\Floppy Drive
. You can make the config.sys and autoexec.bat to be whatever custom files you wish, and simply use the Guide for how to create the bootable disc.
If Ghost did not burn the Ghost image files directly to the optical disk, you must load DOS drivers (such as *oakcdrom.sys* and *mscdex.exe*) that mount optical drives and assigns them DOS drive letters in order for Ghost to access those image files. If Ghost did burn the images initially to optical discs, I have successfully copied those Ghost files to a HDD, and then burned them to new optical discs--and Ghost will now access those image files without the DOS optical drivers--so the critical variable is that Ghost must have created those image files to optical disc initially!
But, if your Ghost image files are going to span multiple CD discs, then it's not really going to be an *automated, unattended* restore anyway!
You may want to review the purpose of the switches you have placed in your image creation autoexec.bat command line--using *-sure* twice is probably unnecessary, your *dst=@cd2* probably needs a file name, *-bootcd* simply suppresses Ghost asking if you have placed a floppy disk in drive A:\, *-ghostoncd* places a copy of *ghost.exe* in the data portion of the CD--but you will have access to that file only if you load DOS drivers that give you a DOS drive letter to access the optical disc's data.
*Restore* autoexec.bat assuming the Ghost file name is *sys.gho*--and you can only use the *@cd2* if Ghost burned the image files directly to optical discs--otherwise you must use the optical drive's DOS drive letter:
@echo off
SET TZ=GHO-08:00
MOUSE.COM
echo Loading...
CD GHOST
GHOST.EXE -clone,mode=prestore,src=@cd2:sys.gho:1,dst=1:1 -sure