티스토리 뷰
물리 시리얼 번호
using System.Management;
ManagementScope myScop = new System.Management.ManagementScope( "\\\\" + Environment.MachineName + "\\root\\cimv2");
SelectQuery oQuer = new SelectQuery("SELECT * FROM Win32_PhysicalMedia");
ManagementObjectSearcher oResult =new ManagementObjectSearcher(myScop, oQuer) ;
foreach(ManagementObject oIte in oResult.Get())
{
foreach(PropertyData oPropert in oIte.Properties )
{
if (oPropert.Value != null && oPropert.Name == "SerialNumber")
{
return oPropert.Value.ToString();
}
}
}
return "";
논리 볼륨 시리얼 번호
//check to see if the user provided a drive letter
//if not default it to "C"
if (drive == "" || drive == null)
{
drive = "C";
}
//create our ManagementObject, passing it the drive letter to the
//DevideID using WQL
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"" + drive + ":\"");
//bind our management object
disk.Get();
//return the serial number
return disk["VolumeSerialNumber"].ToString();
'Programing > C#' 카테고리의 다른 글
Text To Speak (TTS) (0) | 2011.11.27 |
---|---|
HPLAYER v0.3 (0) | 2011.11.27 |
HPLAYER v0.2 (0) | 2011.11.27 |
- Total
- Today
- Yesterday
- V3
- c#
- 하이퍼큐브
- Programming - C / C++
- 녹화
- WPF
- 프로그래밍
- KAI
- ffmpeg
- 소니
- 데몬
- 인코더
- 유마일
- GAME
- Operation System
- 백신
- PSP
- 가상드라이브
- WL-54G
- TCP/IP
- Programing
- Programming - C
- 구글
- API 프로그래밍
- 스터디_발표자료
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |