Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to eject CD automatically on reboot?/Wonders of Ghost!!

Status
Not open for further replies.

dermoyn

Technical User
Jun 1, 2003
17
GB
Scenario:

Teaching a class on PC Repair and Maintenance. The class previous to mine regularly messes up the systems (Operating System wise) and regularly leaves me with no working systems and consequently I have to get to the class very early to sort things out.

Plan:

Make ghost image of desired OS (Win95B containing W2k Boot sector for dual boot) onto CDs and using batch file (gho.bat) consisting of:

ghost.exe -clone,mode=prestore,SRC=@CD:1,DST=1:1 -sure -rb

called by the autoexec.bat on my boot floppy the entire thing automatically restores the image of Win95B onto C:

Problem:

It works a treat. The whole thing is automated. It boots from the floppy tracks down the cd image and restores it onto C:. It then reboots but instead of going into W95 it boots (naturally enough) from the boot floppy again and we go round once more.

I have to do this on over 12 PCs so I can't keep an eye on them all. So, as there is no way to get the system to automatically eject the floppy during the reboot (is there? Sounds a tad unlikely.) I was thinking of making the CD bootable and booting from that.

So, my question would appear to be is there any way to get the CD to eject itself on a reboot so I don't get caught up in that loop again. It would be nice to find myself with 12 ejected CDs so I could just go around and collect them all and know the job was done as Windows would be on the screen.

Thanks in advance
Dermot
 
IT's been a while since I used Ghost but doesn't it wait for your to OK the configuration before it reboots?

If it isn't you need to look at why it is auto-rebooting and stop it. That way you go round and collect your disks and reboot the machines.

All the best.
 
Thanks PCLine,

Yes, I've considered that but I wanted to automate the whole thing. It would have been nice to have just turned around as I went and seen a host of open CD Rom drives with Windows on the screen and all I would have to do is collect the CD Roms.

In my ideal, if a trifle fanciful, way I would get to see whether or not the restore had happened properly.

Ghost's default behaviour gives you the option of rebooting the PC. But you gotta click Reboot. I put the rb switch in to get it to do that automatically!

If nobody comes up with a better idea I'll have to remove the rb switch and do as you suggest. Or just have it go back to a DOS prompt instead of rebooting. That's another option. Either way I would have to reboot each PC and then check to see that each had rebooted successfully.

This is also an experiment to see just how far I can automate things. I'm astonished at what can be done from just using Ghost from a batch file. Awesome.

I wonder if there's any program that can be run that will change the boot order in the BIOS. Because then I could just run that from a batch file after returning to DOS after the restore but then as Ghost has done it's thing and exited the option to automatically reboot will be gone.... That funny noise you just heard is me thinking out loud.

Thanks a lot for your response.
Dermot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top