Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Modal form from modal form Pin
Abhishek Sur28-Jul-09 22:12
professionalAbhishek Sur28-Jul-09 22:12 
QuestionXMLwriter error Pin
newXMLdeveloper28-Jul-09 7:00
newXMLdeveloper28-Jul-09 7:00 
AnswerRe: XMLwriter error Pin
Blikkies28-Jul-09 20:36
professionalBlikkies28-Jul-09 20:36 
Questionreg : cache concepts Pin
Somnath Sen28-Jul-09 6:34
Somnath Sen28-Jul-09 6:34 
AnswerRe: reg : cache concepts Pin
Abhijit Jana28-Jul-09 6:43
professionalAbhijit Jana28-Jul-09 6:43 
QuestionHardware seail number Pin
mht200828-Jul-09 6:15
mht200828-Jul-09 6:15 
AnswerRe: Hardware seail number Pin
DaveyM6928-Jul-09 6:17
professionalDaveyM6928-Jul-09 6:17 
AnswerRe: Hardware seail number Pin
Abhijit Jana28-Jul-09 6:37
professionalAbhijit Jana28-Jul-09 6:37 
mht2008 wrote:
How i can get Hardware seail number of hard disk byc# code?

You can read it easily using WMI.
Try this
using System.Management
Public string GetHDDSerialNumber(string drive)
{
    //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();
}


Source : Use WMI to get HDD's serial number
Note : You have to add System.Management.Dll from Reference

[EDIT]
For Exploring WMI : Please Download WMI Code Creator
[/EDIT]
Hope this will help you Big Grin | :-D

Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
View My Latest Article

AnswerRe: Hardware seail number [modified] Pin
Ravi Bhavnani28-Jul-09 7:15
professionalRavi Bhavnani28-Jul-09 7:15 
GeneralRe: Hardware seail number Pin
Abhijit Jana28-Jul-09 7:44
professionalAbhijit Jana28-Jul-09 7:44 
AnswerRe: Hardware seail number Pin
PIEBALDconsult28-Jul-09 7:26
mvePIEBALDconsult28-Jul-09 7:26 
Questionexpor database Pin
mht200828-Jul-09 5:51
mht200828-Jul-09 5:51 
AnswerRe: expor database Pin
MumbleB28-Jul-09 5:53
MumbleB28-Jul-09 5:53 
AnswerRe: expor database Pin
Vikram A Punathambekar28-Jul-09 6:34
Vikram A Punathambekar28-Jul-09 6:34 
AnswerRe: expor database Pin
musefan28-Jul-09 7:56
musefan28-Jul-09 7:56 
Questiondynami array Pin
mht200828-Jul-09 5:49
mht200828-Jul-09 5:49 
AnswerRe: dynami array Pin
Nagy Vilmos28-Jul-09 6:00
professionalNagy Vilmos28-Jul-09 6:00 
AnswerRe: dynami array Pin
mypicturefaded28-Jul-09 6:05
mypicturefaded28-Jul-09 6:05 
GeneralRe: dynami array Pin
harold aptroot28-Jul-09 6:08
harold aptroot28-Jul-09 6:08 
GeneralRe: dynami array Pin
DaveyM6928-Jul-09 6:15
professionalDaveyM6928-Jul-09 6:15 
GeneralRe: dynami array Pin
mypicturefaded28-Jul-09 6:17
mypicturefaded28-Jul-09 6:17 
QuestionUsing a Custom ScrollBar Within a TreeView C# PinPopular
Zap-Man28-Jul-09 5:42
Zap-Man28-Jul-09 5:42 
QuestionCalculate Accounting Period from Date Pin
drodgers28-Jul-09 4:51
drodgers28-Jul-09 4:51 
AnswerRe: Calculate Accounting Period from Date Pin
DaveyM6928-Jul-09 5:14
professionalDaveyM6928-Jul-09 5:14 
AnswerRe: Calculate Accounting Period from Date Pin
Nagy Vilmos28-Jul-09 5:17
professionalNagy Vilmos28-Jul-09 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.