转自:
http://www.cppblog.com/huangyi5209/articles/143171.html
1 !include MUI.nsh
2
3 Function GetDiskVolumeSerialNumber
4 !define GetVolumeInformation "Kernel32::GetVolumeInformation(t,t,i,*i,*i,*i,t,i) i"
5 System::Call '${GetVolumeInformation}("$0",,${NSIS_MAX_STRLEN},.r0,,,,${NSIS_MAX_STRLEN})'
6 FunctionEnd
7
8 Section
9 StrCpy $0 "C:\"
10 Call GetDiskVolumeSerialNumber
11 IntFmt $0 "%08X" $0
12 MessageBox MB_OK "$0"
13 SectionEnd
posted on 2012-04-06 17:10
王海光 阅读(798)
评论(0) 编辑 收藏 引用 所属分类:
NSIS