Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wuarchive!udel!brahms.udel.edu!sguerke From: sguerke@brahms.udel.edu (Stephen Guerke) Newsgroups: comp.os.msdos.apps Subject: Re: automatic boot pc from batch file Message-ID: <19707@brahms.udel.edu> Date: 16 Mar 91 19:20:17 GMT References: <1991Mar2.233927.20706@macc.wisc.edu> <4725@gumby.Altos.COM> Organization: University of Delaware Lines: 72 In article <4725@gumby.Altos.COM> jerry@altos.COM (Jerry Gardner) writes: >In article <3629@casbah.acns.nwu.edu>, halpern@casbah.acns.nwu.edu (David Halpern) writes... > >>Many times I have to reboot my computer because I change my config.sys >>file in order to include a particular device driver for communications >>or graphics software. There is not base memory to run the graphics >>software if I load both communications and graphics device drivers. >>I would like to have a batch file that would test for the presence of >>the appropriate device drivers, change my config.sys if required and >>reboot my computer without having to press CTRL-ALT-DEL. > The way I solve this problem (without spending money) is to use a small program called reset.com. On my machine I have three configurations that I use frequently. A DOS menu, Windows 3.0 and a setup with a 1.5Mb ramdrive. The DOS menu uses a diskcashe (Norton's), the Windows config. uses Smartdrive. So the three config.sys files are different as are the Autoexec.bat files (and some of the other batch files). On my system (a 286 w/ 3Mb RAM) I have created a subdirectory called SYSTEM, in this subdirectory I store three sets of config.sys and autoexec.bat files, named config.dos, config.win and config.ram (you get the idea :-)). I have three batch files in my root directory called startdos.bat, startwin.bat and startram.bat. These files each look something like this: REM REBOOTS TO DOS ENVIRONMENT COPY C:\SYSTEM\CONFIG.DOS C:\CONFIG.SYS COPY C:\SYSTEM\AUTOEXEC.DOS C:\AUTOEXEC.BAT COPY (OTHER FILES THAT NEED TO BE CHANGED IF ANY) RESET You can create a small program called reset.com by using DEBUG and the following script: (line numbers are not typed) Using an ASCII editor (EDLIN or VDE or Windows NOTEPAD) type the following and save it as RESET.SCR. 1: a 100 2: mov ax,40 3: mov ds,ax 4: mov ax,1234 5: mov [0072],ax 6: jmp f000:e05b 7: 8: r cx 9: 10 10: n reset.com 11: w 12: q once you have saved this script, go to the dos prompt (being sure that the subdirectory containing debug is in your path) and type the following: C:\>debug < reset.scr (be sure you have the < pointing in the proper direction, and be sure that you have typed the .scr file exactly as shown (minus line numbers), and be sure that anything important is saved, if you made a typing error you can crash your system and will have to reboot.) If everything works correctly you will have a new program called reset.com that does the ALT CTRL DEL for you in a batch file. Its not as nice or elegant as useing something like DR.DOS 5.0 (an excellent alternative to MSDOS) but it is a lot cheaper. Steve ======================================================================== Stephen Guerke, Coord. Comp. Resources sguerke@brahms.udel.edu University of Delaware, Parallel Program stephen.guerke@mvs.udel.edu