Can somebody tell me how to call Windows Hard Disk Defragmenter in VB.Net
on Button Click. Any help is greatly appreciated.

Call "c:\windows\system32\dfrg.msc" with shell or system processes or wsh.run or shellexecute.

commented: That's the perfect answer! +6

What do you need exactly is to run windows defragment application or you defragment the hard yourself?

That's tres right (Y), Comatose :)

please give me complate program in VB 6, about defragment file program

please give me complate program in VB 6, about defragment file program

Welcome pande.

We don't have programs. If you have any questions please ask. You are welcome to start your own threads. Please read the rules before posting again - http://www.daniweb.com/forums/thread78223.html and rules.

even you can call the disk fragment like this on button click event

Dim p As New System.Diagnostics.Process
        p.StartInfo.FileName = "dfrg.msc"
        p.Start()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.