Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Dear friends,
How will i do diskdefragment through backend coding. I have done it but the window is totatlly freez. I do not want this.Please help. If you need any clarification then ask me. Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 18-Aug-14 3:33am    
Asking for clarification is useless, because there is nothing to clarify, almost no information.
—SA
krushna chandra jena 18-Aug-14 3:58am    
have you know diskdefragment in windows 7 or windows xp ..
how it will do by c# coding..
Sergey Alexandrovich Kryukov 18-Aug-14 11:22am    
Why?!
—SA
Nathan Minier 18-Aug-14 9:30am    
This isn't a good idea. SSD and some hybrid drives should never be defragged, so I would suggest avoiding code that initializes one without user interaction (which the built-in system has).

You'd be better off opening the system defrag application and letting users decide if they want to run it themselves.
Sergey Alexandrovich Kryukov 18-Aug-14 11:38am    
Agree.
—SA

1 solution

A lot of options are available. like
1. Background Worker
2. Background Thread
3. Delegate BeginInvoke
4. Async Task
.....

The list can go on endlessly. However it depends on you how you choose to resolve it.
 
Share this answer
 

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