retrieve harddisk`s modell,serial,firmware (Windows only)
Too bad. :roll:
Several scenarios:
1. The controller does not support SMART at all.
2. The controlle supports it, but needs to be inquired about the status in a special way
3. The OS is the problem and the call must be different than "PhysicalDrive..."
Guess it is nothing we can solve halfway remotely quick.
If the controller supports a status, the question also is if it is the status of the individual HDDs or just the integrity of the whole RAID.
Best you can do is to try a commercial app, like ActiveSmart and see if that works.
Edit:
Maybe it is supported, but not enabled? I mention this, because I found a note for the Promise Array Manager:
Utility
Name File Size Version Platform Release Date
Promise Array Management (PAM) Utility 3.48MB 3.00.0.42 Windows
2004/6/28
Description
1. Fixed the problem that SMART check function cannot be enabled.
2. Fixed the problem that events are sometimes not reported.
Look for a utility called "Fastcheck".
Several scenarios:
1. The controller does not support SMART at all.
2. The controlle supports it, but needs to be inquired about the status in a special way
3. The OS is the problem and the call must be different than "PhysicalDrive..."
Guess it is nothing we can solve halfway remotely quick.
If the controller supports a status, the question also is if it is the status of the individual HDDs or just the integrity of the whole RAID.
Best you can do is to try a commercial app, like ActiveSmart and see if that works.
Edit:
Maybe it is supported, but not enabled? I mention this, because I found a note for the Promise Array Manager:
Utility
Name File Size Version Platform Release Date
Promise Array Management (PAM) Utility 3.48MB 3.00.0.42 Windows
2004/6/28
Description
1. Fixed the problem that SMART check function cannot be enabled.
2. Fixed the problem that events are sometimes not reported.
Look for a utility called "Fastcheck".
Athlon64 3800+ · 1 GB RAM · Radeon X800 XL · Win XP Prof/SP1+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Yea, I've been looking into it, I'll keep you posted, and thanksHello Phant0m``, when I doubled clicked the SS.Debug.exe it did not produce a log file. Selecting run as Administrator I get an error message "The service cannot be started, either because it is disabled or because it has no enabled devices associated with it."
@Phant0m
Are you logged in as Admin when you run this code? I have the same problem but only when I am not as Admin (on W2k). This is an issue with the code (see Revolver's comments on the first page).
The problem can be solved by converting the following code from C++ to PB. This is from the original (2003) version of DISKID32.CPP - link: http://www.winsim.com/diskid32/diskid32.cpp.
Unfortunately I have been having trouble since I don't know C++. Any help from ANYONE would be appreciated.
All relevant headers and declaratives can be found in the aforementioned link.
Unless I am wrong, and we can convert this code, then this fabulous piece of work by the PB community should show hard disk info for:
Windows 98
Windows 2000 (Admin and non-admin)
Windows XP (Admin and non-admin)
and possibly Windows 2003
WITHOUT using WMI.
Cheers and thanks in advance for any help.
Are you logged in as Admin when you run this code? I have the same problem but only when I am not as Admin (on W2k). This is an issue with the code (see Revolver's comments on the first page).
The problem can be solved by converting the following code from C++ to PB. This is from the original (2003) version of DISKID32.CPP - link: http://www.winsim.com/diskid32/diskid32.cpp.
Unfortunately I have been having trouble since I don't know C++. Any help from ANYONE would be appreciated.
Code: Select all
int ReadPhysicalDriveInNTWithZeroRights (void)
{
int done = FALSE;
int drive = 0;
for (drive = 0; drive < MAX_IDE_DRIVES; drive++)
{
HANDLE hPhysicalDriveIOCTL = 0;
// Try to get a handle to PhysicalDrive IOCTL, report failure
// and exit if can't.
char driveName [256];
sprintf (driveName, "\\\\.\\PhysicalDrive%d", drive);
// Windows NT, Windows 2000, Windows XP - admin rights not required
hPhysicalDriveIOCTL = CreateFile (driveName, 0,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, NULL);
// if (hPhysicalDriveIOCTL == INVALID_HANDLE_VALUE)
// printf ("Unable to open physical drive %d, error code: 0x%lX\n",
// drive, GetLastError ());
if (hPhysicalDriveIOCTL != INVALID_HANDLE_VALUE)
{
STORAGE_PROPERTY_QUERY query;
DWORD cbBytesReturned = 0;
char buffer [10000];
memset ((void *) & query, 0, sizeof (query));
query.PropertyId = StorageDeviceProperty;
query.QueryType = PropertyStandardQuery;
memset (buffer, 0, sizeof (buffer));
if ( DeviceIoControl (hPhysicalDriveIOCTL, IOCTL_STORAGE_QUERY_PROPERTY,
& query,
sizeof (query),
& buffer,
sizeof (buffer),
& cbBytesReturned, NULL) )
{
STORAGE_DEVICE_DESCRIPTOR * descrip = (STORAGE_DEVICE_DESCRIPTOR *) & buffer;
char serialNumber [1000];
strcpy (serialNumber,
flipAndCodeBytes ( & buffer [descrip -> SerialNumberOffset]));
if (0 == HardDriveSerialNumber [0] &&
// serial number must be alphanumeric
// (but there can be leading spaces on IBM drives)
(isalnum (serialNumber [0]) || isalnum (serialNumber [19])))
strcpy (HardDriveSerialNumber, serialNumber);
#ifdef PRINTING_TO_CONSOLE_ALLOWED
printf ("\n**** STORAGE_DEVICE_DESCRIPTOR for drive %d ****\n"
"Vendor Id = %s\n"
"Product Id = %s\n"
"Product Revision = %s\n"
"Serial Number = %s\n",
drive,
& buffer [descrip -> VendorIdOffset],
& buffer [descrip -> ProductIdOffset],
& buffer [descrip -> ProductRevisionOffset],
serialNumber);
#endif
}
else
{
DWORD err = GetLastError ();
#ifdef PRINTING_TO_CONSOLE_ALLOWED
printf ("\nDeviceIOControl IOCTL_STORAGE_QUERY_PROPERTY error = %d\n", err);
#endif
}
memset (buffer, 0, sizeof (buffer));
if ( DeviceIoControl (hPhysicalDriveIOCTL, IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER,
NULL,
0,
& buffer,
sizeof (buffer),
& cbBytesReturned, NULL) )
{
MEDIA_SERIAL_NUMBER_DATA * mediaSerialNumber =
(MEDIA_SERIAL_NUMBER_DATA *) & buffer;
char serialNumber [1000];
strcpy (serialNumber, (char *) mediaSerialNumber -> SerialNumberData);
if (0 == HardDriveSerialNumber [0] &&
// serial number must be alphanumeric
// (but there can be leading spaces on IBM drives)
(isalnum (serialNumber [0]) || isalnum (serialNumber [19])))
strcpy (HardDriveSerialNumber, serialNumber);
#ifdef PRINTING_TO_CONSOLE_ALLOWED
printf ("\n**** MEDIA_SERIAL_NUMBER_DATA for drive %d ****\n"
"Serial Number = %s\n",
drive, serialNumber);
#endif
}
else
{
DWORD err = GetLastError ();
#ifdef PRINTING_TO_CONSOLE_ALLOWED
switch (err)
{
case 1:
printf ("\nDeviceIOControl IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER error = \n"
" The request is not valid for this device.\n\n");
break;
case 50:
printf ("\nDeviceIOControl IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER error = \n"
" The request is not supported for this device.\n\n");
break;
default:
printf ("\nDeviceIOControl IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER error = %d\n\n", err);
}
#endif
}
CloseHandle (hPhysicalDriveIOCTL);
}
}
return done;
}
Unless I am wrong, and we can convert this code, then this fabulous piece of work by the PB community should show hard disk info for:
Windows 98
Windows 2000 (Admin and non-admin)
Windows XP (Admin and non-admin)
and possibly Windows 2003
WITHOUT using WMI.
Cheers and thanks in advance for any help.
One of my friends whom uses an Maxtor 6L080L4 80GB having issue with code not detecting anything for Hard drive information, I investigated this and came up with Intel® Application Accelerator that had been installed was the prevention of the code to work, once I got him to uninstall and reboot there were no longer any issues with him running the code.
Would there happen to be code enhancements available on the board that addresses this problem?
Would there happen to be code enhancements available on the board that addresses this problem?

Wow - this Intel® Application Accelerator seems to be a problem. I never heard of it before last week, when a client was complaining (for months now) that their server keep resetting the network connections every couple of hours. He discovered this "Intel® Application Accelerator" which was running and uninstalled it. Now it works fine. Seems to be a problem application. Just one more thing to debug when supporting customers. ugh.Phant0m`` wrote:One of my friends whom uses an Maxtor 6L080L4 80GB having issue with code not detecting anything for Hard drive information, I investigated this and came up with Intel® Application Accelerator that had been installed was the prevention of the code to work, once I got him to uninstall and reboot there were no longer any issues with him running the code.
Would there happen to be code enhancements available on the board that addresses this problem?
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Hi Straker,Straker wrote:Unless I am wrong, and we can convert this code, then this fabulous piece of work by the PB community should show hard disk info for:
Windows 98
Windows 2000 (Admin and non-admin)
Windows XP (Admin and non-admin)
and possibly Windows 2003
WITHOUT using WMI
now that is an interesting assertion! I'll look into it and try to find out how to put this into PB4.
As a matter of fact, the code is just plain C, not C++
Is there anyone besides me who notices that for at least Western Digital's Hard Drives serial information isn’t always entirely read, for instances HDD serial can be WD-WCAD13933140 and yet these codes provided on the topic will only return WD-WCAD1393314 and leaving out the tail end, for this instance the zero…
The buffer has to be increased to fix?
DiskInfo32 utility shows properly the entire HDD serial information, would be nice to see DiskInfo32 converted to PB language.
The buffer has to be increased to fix?
DiskInfo32 utility shows properly the entire HDD serial information, would be nice to see DiskInfo32 converted to PB language.
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Straker,dell_jockey wrote:Hi Straker,Straker wrote:Unless I am wrong, and we can convert this code, then this fabulous piece of work by the PB community should show hard disk info for:
Windows 98
Windows 2000 (Admin and non-admin)
Windows XP (Admin and non-admin)
and possibly Windows 2003
WITHOUT using WMI
now that is an interesting assertion! I'll look into it and try to find out how to put this into PB4.
As a matter of fact, the code is just plain C, not C++
before trying to translate this into PB, I first tested 'DiskId32', as the function above is used within this program.
As a matter of fact, DiskId32 wasn't able to retrieve 'Vendor Id' and 'Serial Number' in non-admin mode, so I reckon it's no use to put efforts in translating it.... Would have been nice though...
Thunder93:
the failure descibed above was indeed with a pc that has WD harddisks. On my laptop - with a Samsung HM100JC drive - all information could be retrieved - in all modes supported by DiskId32...
I know that it doesn't except for that one function I listed above "ReadPhysicalDriveInNTWithZeroRights()" - is this the one you tried?dell_jockey wrote:As a matter of fact, DiskId32 wasn't able to retrieve 'Vendor Id' and 'Serial Number' in non-admin mode, so I reckon it's no use to put efforts in translating it.... Would have been nice though...
Because here is what the change log says about it:
I believe that the function above is what it is talking about. Granted - it may not work - I just don't know, however, the intent was to bypass admin rights.November 25, 2003 - added a new method for accessing the IDE (and possibly) SCSI disk drives without admin rights on Windows NT / 2K / XP. Also added another algorithm for acccessing disks using the IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER method but I could not get it to work on my USB hard drives.
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Straker wrote:I know that it doesn't except for that one function I listed above "ReadPhysicalDriveInNTWithZeroRights()" - is this the one you tried?dell_jockey wrote:As a matter of fact, DiskId32 wasn't able to retrieve 'Vendor Id' and 'Serial Number' in non-admin mode, so I reckon it's no use to put efforts in translating it.... Would have been nice though...
Because here is what the change log says about it:
I believe that the function above is what it is talking about. Granted - it may not work - I just don't know, however, the intent was to bypass admin rights.November 25, 2003 - added a new method for accessing the IDE (and possibly) SCSI disk drives without admin rights on Windows NT / 2K / XP. Also added another algorithm for acccessing disks using the IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER method but I could not get it to work on my USB hard drives.
DiskId32 uses the function "ReadPhysicalDriveInNTWithZeroRights" (see http://www.winsim.com/diskid32/diskid32.cpp).
As I wrote in my former post: on one PC it failed, on another it worked. It's certainly not a generic solution, which is why I don't pursue this any further.
First page, dmoc post, currently available PB codes failed to retrieve fully the serial off of at least some Western Digital's Hard Drives IN Administrator mode yet…
DiskInfo32 utility on the other hand fully retrieved Western Digital's Hard Drives Serials in administrator mode, as for user restricted modes, not sure, haven’t run tests yet.
DiskInfo32 utility on the other hand fully retrieved Western Digital's Hard Drives Serials in administrator mode, as for user restricted modes, not sure, haven’t run tests yet.
November 25, 2003 - added a new method for accessing the IDE (and possibly) SCSI disk drives without admin rights on Windows NT / 2K / XP. Also added another algorithm for acccessing disks using the IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER method but I could not get it to work on my USB hard drives.
…
How does DiskId32 work ?
• Windows 95 / 98 / ME: Uses a VXD for talking directly to the IDE hard drives - http://www.winsim.com/diskid32/ide21201.vxd
• Windows NT / 2000 / XP (administrator rights): Uses the PhysicalDrive interface
• Windows NT / 2000 / XP (user rights only): Uses the SCSI back door to access the IDE hard drives
• Windows XP (guest rights only): Uses the PhysicalDrive interface
…
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
In non-administrative mode, DiskInfo32 could not retrieve WD HD serial #s for at least one of the pc's I have access to. In administrative mode, there was no problem.Thunder93 wrote:First page, dmoc post, currently available PB codes failed to retrieve fully the serial off of at least some Western Digital's Hard Drives IN Administrator mode yet…
DiskInfo32 utility on the other hand fully retrieved Western Digital's Hard Drives Serials in administrator mode, as for user restricted modes, not sure, haven’t run tests yet.