defrag is not recognized as an internal?
2 Answers. Check to make sure your defrag.exe file actually exists in C:\Windows\System32. Open up a cmd prompt and run this command: defrag.exe /? and post in the question what you get. First of all: set yout project Platform Target property to Any CPU and untick the Prefer 32-bit option (99,9% this is the issue).