Name "test"
OutFile "test.exe"
!include MUI.nsh
Function GetDiskVolumeSerialNumber
!define GetVolumeInformation "Kernel32::GetVolumeInformation(t,t,i,*i,*i,*i,t,i) i"
System::Call '${GetVolumeInformation}("$0",,${NSIS_MAX_STRLEN},.r0,,,,${NSIS_MAX_STRLEN})'
FunctionEnd
Section
StrCpy $0 "C:\"
Call GetDiskVolumeSerialNumber
IntFmt $0 "%08X" $0
MessageBox MB_OK "$0"
SectionEnd
|