View Full Version : Script for Hardrive Serial
KenR60
23rd July 2008, 22:34
Has anyone developed a script to read the hard Drive Serial?
LoRd_MuldeR
23rd July 2008, 22:44
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...
KenR60
23rd July 2008, 22:56
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.
LoRd_MuldeR
23rd July 2008, 22:59
You can use the System plugin to call "kernel32::GetVolumeInformationA" :)
See: NSIS/Docs/System/System.html
KenR60
23rd July 2008, 23:11
Excellent ... I will check it out now, Thanks for the help
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.