/**
* 获取C盘卷 序列号
* @return
*/
public String getDiskNumber()
{
String line = "";
String HdSerial = "";//记录硬盘序列号
try {
Process proces = Runtime.getRuntime().exec("cmd /c dir c:");//获取命令行参数
BufferedReader buffreader = new BufferedReader(
new InputStreamReader(proces.getInputStream()));
while ((line = buffreader.readLine()) != null) {
if (line.indexOf("卷的序列号是 ") != -1) { //读取参数并获取硬盘序列号