Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!mdivax1!mitchell Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Autoexec/Config batch changer (?) Keywords: help finding Message-ID: <1991Jan4.021829.15528@mdivax1.uucp> Date: 4 Jan 91 02:18:29 GMT References: <1991Jan3.173437.8108@tc.fluke.COM> Reply-To: mdivax1!mdisea!mitchell (Bill Mitchell) Organization: Mobile Data International Lines: 82 Return-Path: Apparently-To: van-bc!rnews In article <1991Jan3.173437.8108@tc.fluke.COM> joshua@fluke.tc.fluke.com (John) writes: > >I have heard of a utility that allows selection of various configurations >of a system via different AUTOEXEC.BAT and CONFIG.SYS. It will select the >correct files and reboot for you automatically depending on choices. >Does anyone know of such a creature? Do you know where to get it? > Here is what I use: ---------- \batch\boot.bat ---------- @echo off :start if "_%1" == "_" goto sayit if not exist \boot\%1\autoexec.bat goto error if not exist \boot\%1\config.sys goto error copy \boot\%1\autoexec.bat \ >nul copy \boot\%1\config.sys \ >nul if "_%2" == "_next" goto done echo last boot was %1 >\boot\lastboot.txt reboot echo ERROR - reboot failed goto done :sayit type \boot\lastboot.txt goto done :error echo %0 %1: ERROR goto done :done ------------- debug script reboot.dbg to create \bin\reboot.com ----------- a 100 MOV SI,0080 ;point at command tail MOV CX,[SI] ;get the length XOR CH,CH ;check if it was zero JCXZ 0115 ;if so, jmp INC SI ;else get first char of arg 1 INC SI MOV AL,[SI] ;into al CMP AL,43 ;was is "C"? JZ 011A ;if so, jmp CMP AL,63 ;was it "c"? JZ 011A ;if so, jmp MOV BX,1234 ;set bx to magic number 1234 hex JMP 011F ;and jmp MOV BX,7F7F ;else set bx to non-magic number MOV AX,0040 MOV DS,AX MOV [0072],BX ;store bx in 0040:0072 JMP FFFF:0000 ;and reboot n reboot.com r bx 0 r cx 2b w cs:100 q ------------ that's all --------------- First, say "reboot