- Login as Admin or with an account that has administrator privileges.
- Copy the following lines to a text file, name it as "defrag_bat.bat" and store it C:\Windows\System folder.
- Create folder called C:\Temp if it is not present already.
Echo ////////////////////////////////////////////////////////////// >> c:\Temp\Defrag.log
Echo Defrag started at @ && Date/T >> c:\Temp\Defrag.log && Time/T >> c:\Temp\Defrag.log
Echo ////////////////////////////////////////////////////////////// >> c:\Temp\Defrag.log
defrag c: /f >> c:\Temp\Defrag.log
Echo Defrag Ended at @ && Date/T >> c:\Temp\Defrag.log && Time/T >> c:\Temp\Defrag.log
Echo ////////////////////////////////////////////////////////////// >> c:\Temp\Defrag.logSchedule a Task to run it at a time you are not supposed to use the computer.
0 comments:
Post a Comment