Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I want to open disk defragment window in Windows7 by visual studio 2010 C# .net .

there i use this code

Process.Start("dfrgui"); // 'dfrgui' is used to open disk defragment window in windows 7

but that Window does not appear .

but in windows xp i use

Process.Start("dfrg.msc");

here the window is appear .

is there any another way to call defragmenter in windows 7 ?
Posted
Updated 30-Sep-12 21:14pm
v6

 
Share this answer
 
Change your Target Platform for building the project from "x86" to "AnyCPU" in the project settings. This worked for me.
 
Share this answer
 
i tried but nothing is working

please anyone send me the way to do it at asif.2010.ansari@gmail.com
 
Share this answer
 
Comments
Rajesh waran 24-Feb-15 4:19am    
Posting Answer to very old question is not a good idea.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900