Retrieving and displaying the Disk Volume Serial number in NSIS -


i using nsis(hm nisedit 2.0.3 editor) building setup(s) of application. having requirement 1 of setups use disk volume serial number(in hexadecimal format).i need display same in message box. can please post me complete piece of script getting disk volume serial number displaying in message box?

this page describes how retrieve serial number in hex format:

http://nsis.sourceforge.net/get_disk_volume_serial_number

so need include function in script:

function showdiskvolumeserialnumber   !define getvolumeinformation "kernel32::getvolumeinformation(t,t,i,*i,*i,*i,t,i) i"   system::call '${getvolumeinformation ("$0",,${nsis_max_strlen},.r0,,,,${nsis_max_strlen})'   intfmt $0 "%08x" $0   messagebox mb_ok $0 functionend 

and call this:

strcpy $0 "c:\\" call showdiskvolumeserialnumber 

obviously can replace drive letter whatever ensure has double trailing backslash .


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -