Hit Windows+R and type REGEDIT.
Navigate to the following key In the left hand tree:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
On the right find BootExecute and double click on it.
There may be a number of lines in the list that appears - the one you are looking for should look like this:
autocheck autochk /p \??\C:
This is what mine looks like after setting a boot time chkdsk:
autocheck autochk /p \??\C:
PDBoot.exe
autocheck autochk *
If it exists delete that line (including the blank line after you have deleted it) and click OK (leave any other lines alone). Close the registry editor and restart.
Once you have fixed it I suggest running a boot time chkdsk on drive C: before attempting to defrag it.
To do that hit Windows+R and type CMD. In the open window type:
CHKHDSK C: /R
and press enter (assuming it is NTFS formatted). When prompted say yes to doing this on next restart. Restart your computer and go and get some coffee.
During the next reboot it should run a complete health check on drive C: