Get Disk Volume Serial Number: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Reverted edits by 71.8.11.71 to last version by 219.94.48.2) |
No edit summary |
||
Line 7: | Line 7: | ||
; $0 - Drive to check returns the Disc Serial Number | ; $0 - Drive to check returns the Disc Serial Number | ||
Function GetDiskVolumeSerialNumber | Function GetDiskVolumeSerialNumber | ||
!define GetVolumeInformation "Kernel32::GetVolumeInformation(t, | !define GetVolumeInformation "Kernel32::GetVolumeInformation(t,t,i,*i,*i,*i,t,i) i" | ||
System::Call '${GetVolumeInformation}("$0",,${NSIS_MAX_STRLEN},.r0,,,,${NSIS_MAX_STRLEN})' | System::Call '${GetVolumeInformation}("$0",,${NSIS_MAX_STRLEN},.r0,,,,${NSIS_MAX_STRLEN})' | ||
FunctionEnd ;GetDiskVolumeSerialNumber | FunctionEnd ;GetDiskVolumeSerialNumber |
Revision as of 23:55, 1 December 2007
Author: b_avery@yahoo.com (talk, contrib) |
Description
Do you need to find out the Disc Serial Number, well here you go, $0 - Drive to check returns the Disc Serial Number
; $0 - Drive to check returns the Disc Serial Number 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 ;GetDiskVolumeSerialNumber
This has been created as a result of:
http://forums.winamp.com/showthread.php?postid=1320397#post1320397
; To view Disc Serial Number in hexsadecimal format IntFmt $0 "%08X" $0