I want to create a program to delete a partition using VB.NET or CSharp.NET
But I have no idea how to do it. I know a big portion of VB.NET now and not this.
I can´t find it on the whole internet and this website is my best bet.

Recommended Answers

All 3 Replies

I'm going with you should not do this. Why? Because your app could be on any Windows version from XP to 10 and the commands vary from OS to OS and machine to machine. That said if I was to tackle this I would shell out to the host OS's command line disk partition tool.

As you know your OS target, then find it's diskpart command line and shell to that to do the deed.

Since shelling out is widely discussed I'll leave that to you.

Why bother? There is already a program (diskmgmt.msc) on every version of Windows that already does this. And if you need finer control and more options there is diskpart.exe which is also included.

Thanks for the help !

Be a part of the DaniWeb community

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