
StrPATH = Left(App.Path, InStr((InStr(3, App.Path, "\") + 1), App. 'checking whether the drive is local or mapped The following sample provides serial of the drive where your EXE is 'APi declarationĭeclare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long Es gratis registrarse y presentar tus propuestas laborales. SDrive, vbNullString, 0, GetSerialNumber, _ĭrive = InputBox("Enter drive for checking SN") Busca trabajos relacionados con Read hard drive serial number vba o contrata en el mercado de freelancing más grande del mundo con más de 21m de trabajos. Lib "kernel32" Alias "GetVolumeInformationA" _īyVal lpFileSystemNameBuffer As String, _īyVal nFileSystemNameSize As Long) As Long Lastly, the utility supports many development languages like various versions of Delphi, C++ Builder, VBA, VIsual Basic, PowerBuilder, Visual Foxpro and Clarion, among others.Private Declare Function GetVolumeInformation _ As it can easily be observed from the demo, the information is neatly displayed in a single window along with relevant details such as serial and model number, firmware rev, buffer size, cylinders, heads, sectors, so on and so forth. Moreover, the utility works equally well with both standard computers and virtual machines. It is important to note that the tool does not depend on other so-called support libraries, so it works as is and does not need prerequisites.Īt the same time, the developer points out that the tool grabs the real serial number of the hard disk and not other information, such as partition ID or volume ID, for instance. GetDiskSerial DLL is a standard Windows DLL that can be used to read the serial number from the connected hard disks. Therefore, users interested in creating a machine ID or encryption number simply need to know the aforementioned information to create a distinctive serial number. When it comes to serial numbers and especially hard disks, the acknowledgement is that the said number is unique.
