磁盘初始化和卷创建 [英] disk initialization and volume creation

查看:118
本文介绍了磁盘初始化和卷创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我一直在反对MSDN和WMI文档,并且一无所获!有谁知道是否有一种方法可以初始化原始磁盘,并通过c#程序在所有磁盘上创建卷吗?

我曾与Win32_disk和朋友一起工作过,但实际上似乎WMI唯一适合做的就是检索信息,您不能用它真正地做"任何事情.

无论如何,我几乎准备好从程序中对diskpart进行调用,但是有了diskpart shell,我肯定也会很有趣.

So I''ve been beating my head against MSDN and WMI documentation and am not having any luck whatsoever!! Does anybody know if there is a method to intialize a raw disk, and create a volume on it all from within a c# program?

I''ve worked with Win32_disk and friends, but really it seems that the only thing WMI is good for is retrieving info, you can''t really "do" anything with it.

Anyway, I''m almost ready to resort to making calls to diskpart from within my program, but with the diskpart shell I''m sure that will be interesting as well.

推荐答案

我不确定C#安全沙箱是否允许此类事情.我认为最好的方法是调用程序附带的外部实用程序.
I am not sure that C# security sandbox allows such things. I think the best way is to call external utility which should be shipped with your program.


这篇关于磁盘初始化和卷创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆