TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Minnu Merin Alex
NA
191
27.4k
not getting hard drive serial number
Jul 29 2016 1:54 AM
i have tried using the code
searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
int i = 0;
foreach (ManagementObject wmi_HD in searcher.Get())
{
// get the hard drive from collection
// using index
HardDrive hd = (HardDrive)hdCollection[i];
// get the hardware serial no.
if (wmi_HD["SerialNumber"] == null)
hd.SerialNo = "None";
else
hd.SerialNo = wmi_HD["SerialNumber"].ToString();
++i;
}
but this is not working for windows 8 and higher versions..
Reply
Answers (
2
)
How to sp use 3 tier architecture login
error in installing windows application