MDGx Posted May 3, 2005 Share Posted May 3, 2005 MDGxJust to make sure you speak english and not chinese:in order to be able to exit Windows to native MS-DOS, like I do. Then you need to run Windows from within a batch file,Do you mean making a transition to an MS-DOS state between windows tasks end down and the power goes off, or do you mean restarting or sort-of restarting in MS-DOS mode, with a set of batch files?Then how do run windows "from withion a batch file" if you exited windows?In my conception, you can run only DOS program in DOS, windows program require windows... or that means that windows is still active somehow...Unfortunately Chinese is not among the languages I speak. I meant native/pure/true MS-DOS, as in no WIN.COM leftover in memory nor vmm32.If u read the pages I linked in previous post, you can achieve that too. Necessary steps:1. Move command.com from c:\windows to C:\ root.2. Delete all files from C:\ root except autoexec.bat, config.sys, command.com, io.sys, msdos.sys, logo.sys and [if u like it like I do] winboot.ini:http://www.mdgx.com/newtip16.htm#WBINIand if u use NT4/2000/XP/2003/Longhorn [like I do], u also need to keep in C:\ root these other files:BOOT.INI, BOOTSECT.DOS, NTDETECT.COM, NTLDR and eventually CMLDR if u installed C:\cmdcons .If still using DOS 6.xx, u can also keep *.DOS + *.W40 files in C:\ root.3. Change config.sys to include these lines [paths + files are mine, change to match yours]:SWITCHES=/FDOS=HIGH,UMB,AUTODEVICE=C:\MAX\UMBPCI.SYSDEVICE=C:\MAX\HIRAM.EXEDEVICE=C:\MAX\HIMEM.SYS /NUMHANDLES=120 /TESTMEM:OFF /QDEVICEHIGH=C:\MAX\IFSHLP.SYSINSTALLHIGH=C:\MAX\SMARTDRV.EXE 10480 16 A- B- C+ D+ E+ F+ G+ H+ I+ /N /QINSTALLHIGH=C:\MAX\NOOFF.COMBUFFERS=11,0FILES=70FCBS=1,0LASTDRIVE=JSTACKS=0,0SHELL=C:\COMMAND.COM C:\ /E:1024 /P /FSET COUNTRY=001SET PATH=C:\;C:\W98;C:\W98\SYSTEM;C:\BAT;C:\MAX;C:\ZIP;C:\3D;C:\SB16;D:\WMP;D:\WORDVIEW;..\ACCDATE=C- D- E- F-U can find UMBPCI.SYS + HIRAM.EXE here:http://www.mdgx.com/umb.htmNote that I moved himem.sys, smartdrv.exe, emm386.exe, ifshlp.sys, dblbuff.sys, mscdex.exe from C:\windows and from C:\windows\command to C:\MAX .The lineSHELL=C:\COMMAND.COM /E:xxxx /Pis *essential* for this to work.4. D/l + install NOOFF.COM into config.sys [see this page: http://www.mdgx.com/98-4.htm#98ATX ] so when u exit Windows to native MS-DOS, it won't shut off your PC, but it will go to the plain C:\ prompt, with no Windows module in memory.5. Modifiy your C:\msdos.sys [and/or C:\winboot.ini if u use it] to include these lines:[Options]AutoScan=0BootDelay=0BootGUI=0BootKeys=1BootMenu=0BootMenuDefault=1BootMenuDelay=0BootMulti=1BootWin=1DblSpace=0DisableLog=1DoubleBuffer=0DrvSpace=0LoadTop=0Logo=1Network=1SystemReg=0Complete MSDOS.SYS reference:http://www.mdgx.com/msdos.htmNote that I've disabled scandisk upon boot, double buffer and registry scanner.6. Autoexec.bat can be safely deleted, if u need SET <variable>=xxxxxxxx lines u can add them all to your config.sys instead. Example [most apply only to my computer]:SET PROMPT= [0;33mMDGx [1;m HI+UMB: [0;31mWin[1;mDO[0;31mw[1;mS [0;31m98 SE$_[36m$P$GSET WINPMT= [0;33mDOS box [1;m Hit Insert 2 ÄÙ 2 Windows$_[36m$P$GSET TEMP=D:\TEMPSET TMP=D:\TEMPSET PKTMP=D:\TEMPSET DOS16M=2SET CLASSPATH="C:\W98\SYSTEM\QTJAVA.ZIP"SET QTJAVA="C:\W98\SYSTEM\QTJAVA.ZIP"SET MOUSE=C:\MAXSET COPYCMD=/YSET DIRCMD=/A/O:GEN/P/VSET FX_GLIDE_NO_SPLASH=1SET TZ=MST7MDTSET CTCM=C:\SB16SET SOUND=C:\SB16SET BLASTER=A220 I5 D1 H5 P330 E620 T6SET MIDI=SYNTH:1 MAP:E MODE:0I do keep C:\autoexec.bat so I can run C:\WIN.BAT from it [see below for explanation].My C:\autoexec.bat [paths + files apply only to my PC]:@CTTY NULC:\3D\FASTVID.EXE 1X1 128 C0000000LOADHIGH=C:\MAX\XMSDSK.EXE 81920 H: /T /YIF NOT EXIST H:\TEMP\NUL MKDIR H:\TEMPIF NOT EXIST D:\TEMP\CACHE\NUL MKDIR D:\TEMP\CACHELOADHIGH=C:\MAX\RECALL.COM -ILFNFOR ONSET PROMPT= [0;33mMDGx [1;m HI+UMB: [0;31mWin[1;mDO[0;31mw[1;mS [0;31m98 SE$_[36m$P$GSET WINPMT= [0;33mDOS box [1;m Hit Insert 2 ÄÙ 2 Windows$_[36m$P$GC:\SB16\CTCM.EXE /BC:\SB16\AWEUTIL.COM /S /EM:GM /R:0 /C:0C:\SB16\MIXERSET.EXE /P /QIF EXIST C:\CTPNP.CFG DEL C:\CTPNP.CFGC:\MAX\MODE.COM CON: RATE=32 DELAY=1C:\MAX\ATTRIB.EXE +A -H -R -S C:\*.*IF EXIST C:\LOGO.SYS DEL C:\LOGO.SYSC:\MAX\PAPER.EXE F:\BMP\LOGO.ZIP C:\ZIP\PKUNZIP.EXE /NRIF EXIST C:\WALPAPER.BMP RENAME C:\WALPAPER.BMP LOGO.SYSSET TEMP=D:\TEMPSET TMP=D:\TEMPSET PKTMP=D:\TEMPSET DOS16M=2SET CLASSPATH="C:\W98\SYSTEM\QTJAVA.ZIP"SET QTJAVA="C:\W98\SYSTEM\QTJAVA.ZIP"SET MOUSE=C:\MAXSET COPYCMD=/YSET DIRCMD=/A/O:GEN/P/VSET FX_GLIDE_NO_SPLASH=1SET TZ=MST7MDTSET CTCM=C:\SB16SET SOUND=C:\SB16SET BLASTER=A220 I5 D1 H5 P330 E620 T6SET MIDI=SYNTH:1 MAP:E MODE:0LOADHIGH=C:\MAX\CTMOUSE.EXE /P /R44CTTY CON@ECHO OFFTYPE C:\BAT\KEY.TXTCLSECHO [1;30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛ[31m Windows 98 SE + MS-DOS 7.10 [34mÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛC:\WIN.BAT7. Optional: u can use my modded WIN.COM to exit to native MS-DOS [only if NOOFF.COM is already loaded in memory] even when u run:RUNDLL.EXE USER.EXE,ExitWindowsExecIf u decide to use my modded win.com, the only way to reboot your PC now is to run this command:RUNDLL32 %windir%\SYSTEM\SHELL32.DLL,SHExitWindowsEx 2Complete guide here:http://www.mdgx.com/98-4.htm#98ATX8. If u followed all steps so far, you will be able to boot to native MS-DOS instead of Windows UI, and then u can run WIN.COM or WIN.BAT [i mentioned it in previous post] to load Windows.Example of WIN.BAT, which in my case must reside in C:\ root [paths + files apply only to my PC]:@CTTY NULVER | FIND.EXE/I " 98"IF ERRORLEVEL 1 GOTO NXMEM.EXE/C | FIND.EXE/I "vmm32"IF NOT ERRORLEVEL 1 GOTO NXIF NOT EXIST F:\BMP\1024.ZIP GOTO N0IF NOT EXIST F:\BMP\WALPAPER.BMP GOTO N0F:CD\BMPIF EXIST C:\MAX\RAM\PAPER.EXE C:\MAX\RAM\PAPER.EXE F:\BMP\1024.ZIP C:\ZIP\PKUNZIP.EXE /NRIF EXIST C:\MAX\RAM\OMBRA.EXE C:\MAX\RAM\OMBRA.EXE /Q /S F:\BMP\WALPAPER.BMP:N0MEM.EXE/C | FIND.EXE/I "NOOFF"IF ERRORLEVEL 1 LOADHIGH=C:\MAX\RAM\NOOFF.COMIF NOT EXIST D:\TEMP\CACHE\NUL MKDIR D:\TEMP\CACHEC:CD\@CTTY CON@ECHO OFFIF EXIST C:\BAT\KEY98.TXT TYPE C:\BAT\KEY98.TXTIF EXIST %winbootdir%\WIN.COM %winbootdir%\WIN.COM %1 %2 %3IF EXIST C:\MAX\SMARTDRV.EXE C:\MAX\SMARTDRV.EXE /CCLSECHO [1;30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛ[31m Native MS-DOS 7.10 Mode ACTIVE ! [34mÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[34mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[30mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛECHO ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[0;mIF EXIST C:\BAT\KEY.TXT TYPE C:\BAT\KEY.TXT@CTTY NULC:CD\:NX@CTTY CON@ECHO OFFEXITNote that ECHO colored code above needs ANSI.SYS [or better replacement] loaded in config.sys.NANSI.SYS is the best + fastest:NANSI.SYS v4.0a 16-bit DOS ANSI CONsole Driver Accelerator TSR fastest andmost versatile Microsoft ANSI.SYS replacement for MS-DOS 5/6 and Windows 9x/MEwith built-in support for key remapping [also part of FreeDOS:http://www.freedos.org/]:http://www.kegel.com/nansi/Direct download [59 KB, free GPL]:http://www.coli.uni-sb.de/~eric/stuff/soft...rs/nansi40a.zipUses 3.2 KB of upper DOS RAM if loaded with DEVICEHIGH in CONFIG.SYS (uppermemory manager required in CONFIG.SYS).NANSI.SYS ASCII sequences can be used to create colorful DOS prompts, startANY DOS/Windows program at the touch of a key by remapping ANY keys on ANY 101(or more keys) enhanced keyboard etc.See "F1-F12 Remapping = MS-DOS Mode + ANSI Driver" in DOSTIPS.TXT (part of W95-11D.EXE) for details.I'm doing this since Win95 FE came out, and works with ALL Win9x releases, even up to WinME, but only if u modded WinME [a.k.a. MS-DOS 8.00] boot files to allow access to native MS-DOS:Unofficial Windows ME Real DOS-Mode Patch v1.3 16-bit modifies COMMAND.COM +IO.SYS (from C:\Windows\Command\EBD) and REGENV32.EXE (from C:\Windows\System)to reenable native MS-DOS boot option and use custom AUTOEXEC.BAT + CONFIG.SYSfiles (the Windows 95/98 style) to run MS-DOS based apps/games that do NOTwork from a Windows DOS session:http://www.geocities.com/mfd4life_2000/Direct download [9 KB, freeware]:http://www.geocities.com/mfd4life_2000/mfddme13.zipHowTo Guide:http://www.dewassoc.com/support/winme/real_dos.htmMore info:http://users.iafrica.com/c/cq/cquirke/me-dos.htmSee MEMORY.TXT (part of W95-11D.EXE) for complete memory management guidelines, and learnhow to tweak your AUTOEXEC.BAT + CONFIG.SYS to free MAXimum conventional DOSmemory.When I say I exit Windows to native MS-DOS, I don't mean to run "Exit To DOS.PIF", which only starts a new command.com instance, and leaves WIN.COM in memory.From this MS-DOS prompt [almost native MS-DOS, but not quite ] u can return to Windows UI by simply typing EXIT and hitting Enter.Details on how this works here:http://www.mdgx.com/newtip10.htm#EXIT2DOSConclusion:I boot to native/pure/true/real MS-DOS mode.I start Windows 98SE from C:\WIN.BAT.I exit Windows back to native/pure/true/real MS-DOS mode by simply shutting it down normally.I reload Windows UI from C:\WIN.BAT as many times as I want, without rebooting.Hope this helps. Link to comment Share on other sites More sharing options...
Fredledingue Posted May 3, 2005 Share Posted May 3, 2005 Thank you very much for your explanation MGDx. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now