Archive: Script for Hardrive Serial


Script for Hardrive Serial
Has anyone developed a script to read the hard Drive Serial?


If there is an OS function in the Win32 API that can read out the serial from the HDD, then you can call it via the well-known "System" plugin...


Thanks for that LoRd_MuldeR ... at the moment I use VB6 and

Public Declare Function GetVolumeInformation Lib "kernel32.dll" Alias "GetVolumeInformationA" (ByVal lpRooCC_Main_PathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long

then a Function to retreve this Number. Just wanting the NSIS Installer to read the Serial Number on loading.


You can use the System plugin to call "kernel32::GetVolumeInformationA" :)

See: NSIS/Docs/System/System.html


Excellent ... I will check it out now, Thanks for the help