Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to creat a bat file that will call or run defrag, that part is ok.
Thing is that defrag still wants me to hit OK, is there a command that will send "OK" to defrag from the bat file?
thanks

Hello Dave, I'v used a lot time to find out the best settings for Defrag ( +else),
and I also use Win98 like U do, so try out My settings (just copy and paste the
below into Notepad and save it as "DeFrag -ALL- harddisks on next Boot.reg"==========DeFrag -ALL- harddisks on next Boot.reg=========START=====
REGEDIT4[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx]
"Title"="DeFrag -ALL- on next Boot"
"Flags"=dword:00000003[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\DeFrag-ALL]
"Cmd"="DEFRAG.EXE /all /f /h /p /b /detailed /noprompt";;===========================================================================;;
;; !! This "*.REG" is for Win98[SE] & WinME. !! NO warrantys "whatsoever" !! ;;
;;===========================================================================;;
==========DeFrag -ALL- harddisks on next Boot.reg==========END======Thenever U wanna Defrag: just execute above .REG-file & reboot, it then auto-starts
defragmenting before everything is loaded and without any confirmation needs at all :-)(After Defrag is finish: the PC will continue & complete the loading of Win98 like usual)
Note: its also recommended using the Defrag.exe from WinME cause it is bettr'n fastr :)
-- Good luck! Hi, and let me know how this worked (or if U have other questions), OK?
_________________________________________________________________________

for a simple batch file to run
Scandisk:
Copy the text between the lines. Open Notepad.exe. Paste it into a Notepad and save the file as Scandisk.bat
--------------------
@echo off
c:\windows\scandskw.exe c: /all /noninteractive /silent
------------------
2 line in this fileDefrag without rearrange files:
Copy the text between the lines. Open Notepad.exe. Paste it into a Notepad and save the file as Defrag.bat
------------------
@echo off
del /y C:\WINDOWS\APPLOG\*.*
c:\windows\defrag.exe /all /f /p /details /noprompt
------------------
2 lines in this fileRun both Scandisk then Defrag:
------------------
@ECHO OFF
START /W c:\windows\scandskw.exe c: /ALL /noninteractive /silent
START c:\windows\defrag.exe /all /noprompt /detailed
------------------
Copy the text between the lines. Open Notepad.exe. Paste it into a Notepad and save the file as Scandef.bat there is 3 lines in this file.Adapt the contents to what suits you.
HTH

U suggested to DEL %windir%\APPLOG\*.* :-)
..well I highly recommend to UN-install & dis-
able "Taskmon" completely (it doesn't exactly
impress or make any miracle improvements so!)To "Tefran", sorry I can't help, because I never
have used "Windows Profetional 2000". Try to
post it as a NEW subject. Also shortly describe
what U already tryed +what IS /is NOT working!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |