msdarmawan
29th January 2007 07:13 UTC
Get drive information
Dear all,
Is it possible to get an information from a drive?
I wantted to extract a drive volume label, drive size, drive volume serial number, drive letter, and all other information on a removable drive.
Your help is valuable for me.
Thanks in advance.
msdarmawan
29th January 2007 07:36 UTC
Sorry... frankly speaking, what I want is to get a drive volume serial number in selected removable drive (USB Flash Disk)...
I cannot find it if I used a filefunc.nsh.
Thanks...
msdarmawan
29th January 2007 07:56 UTC
Aargh...
Really sorry, just ignore the volume serial number... I've got the good link (http://forums.winamp.com/showthread....97#post1320397).
But, still looking for a script/function to find a removable drive...
Thanks and sorry for the inconvenience...
Regards,
msdarmawan
29th January 2007 11:07 UTC
Finally...
Still from the same link, but this is final one I guess...
http://nsis.sourceforge.net/wiki/Get..._Serial_Number
All I need is Fulfilled now with below function.
Sorry, I didn't try to looking for the function before...
So I posted to this forum... if someone need it :D
Section
${GetDrives} "ALL" "GetDriveInfo"
>SectionEnd
>Function GetDriveInfo
!define GetVolumeInformation "Kernel32::GetVolumeInformation(t,t,i,*i,*i,*i,t,i) i"
System::Call '${GetVolumeInformation}("$9",.r0,${NSIS_MAX_STRLEN},.r1,,,,${NSIS_MAX_STRLEN})'
IntFmt $1 "%08X" $1 ;To view Disc Serial Number in hexsadecimal format
MessageBox MB_OK "$9 ($8 Drive) - VolLabel:($0) - SerialNumber:($1)"
Push $0
System
::Free 0
FunctionEnd
>
Peace...
msdarmawan
29th January 2007 11:11 UTC
Sorry again... bad preview...
Finally...
Removable Disk is FDD Disk...
Still from the same link, but this is final one I guess...
http://nsis.sourceforge.net/wiki/Get..._Serial_Number
All I need is Fulfilled now with below function.
Sorry, I didn't try to looking for the function before...
So I posted to this forum... if someone need it :D
Section
${GetDrives} "ALL" "GetDriveInfo"
>SectionEnd
>Function GetDriveInfo
!define GetVolumeInformation "Kernel32::GetVolumeInformation(t,t,i,*i,*i,*i,t,i) i"
System::Call '${GetVolumeInformation}("$9",.r0,${NSIS_MAX_STRLEN},.r1,,,,${NSIS_MAX_STRLEN})'
IntFmt $1 "%08X" $1 ;To view Disc Serial Number in hexsadecimal format
MessageBox MB_OK "$9 ($8 Drive) - VolLabel:$0 - SerialNumber:$1"
Push $0
System
::Free 0
FunctionEnd
>
Peace...