How to Defrag your computer

Defrag your computer Vista, Win 7, Win 8, Win 10,
Once you do this, You should not have to do this agian

Win 10 defrag

Quicker way to Run defrag

Copy and paste, defrag -c -w -f and hit Enter key

Left Click and hold, select all and Right Click Copy, Open Notepad
Right Click Paste into Notepad
Save as defrag.vbs in Desktop

dim wshshell, objfso
Set WshShell = CreateObject("WScript.Shell")
Set objfso = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
for Each objOS in colOS
if instr(objOS.Caption,"Vista") or instr(objOS.Caption,"7") or _
instr(objOS.Caption,"8") or instr(objOS.Caption,"10") then
if WScript.Arguments.length =0 then
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "wscript.exe", Chr(34) & _
WScript.ScriptFullName & Chr(34) & " uac", "", "runas", 1
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%COMSPEC% /c defrag -c -w -f"
end if
elseif instr(objOS.Caption,"XP") then
Set dc = objfso.Drives
for each d in DC
if d.DriveType = 2 then
return = WshShell.Run("defrag " & d & " -f", 1, TRUE)
end if
msgbox "This script works in Vista & Windows 7, 8.1, 10"
end if

If still having Trouble Try

Free Computer Inspection

Call Today or Stop by
Home 641.673.7432
Jim Cell 1.641.295.1470
815 8th Ave East
Oskaloosa, IA 52577

Get Directions

Enter your starting address:

Send us a comment / Need some help

Your Name:
Email Adress:
Copyright © 2007 - 2019 Jim & Lois Fulk, - All rights reserved Policy Statement