PDA

View Full Version : Wrong result of free disk space



NewsArchive
05-07-2011, 06:14 AM
Hi Friedrich,

the function "Get System Info --> Free disk space" gives a wrong result,
if the disk as more than 2TB free.

At the moment, I have a very dirty hack to deal with this problem:

Set Variable %_FH_DISKSPACE% to FUNCTION:Get System Info(Free
Disk Space) for "%_FH_DRIVE%"
Set Variable %_FH_DISKSPACE% to %_FH_DISKSPACE% / 1024
(Arithmetic & Bitwise Operation)
If %_FH_DISKSPACE% Less Than "0" Then
Set Variable %_FH_DISKSPACE% to %_FH_DISKSPACE% * -1
(Arithmetic & Bitwise Operation)
Set Variable %_FH_DISKSPACE% to %_FH_DISKSPACE% + 2097152
(Arithmetic & Bitwise Operation)
End
Text File: Insert Line "0" to "%_FH_LOGFILE%" -- Der freie
Speicherplatz auf Laufwerk %_FH_DRIVE% beträgt %_FH_DISKSPACE% MByte.
If %_FH_DISKSPACE% Less Than "1024" Then
Set Variable %_FH_ERROR% to "$TRUE$"
Text File: Insert Line "0" to "%_FH_LOGFILE%" -- Weise Nutzer
darauf hin, dass für AIDA mindestens 1024 MB Plattenplatz vorhanden sein
müssen.
Display Message Box "Der Speicherplatz auf dem gewählten
Laufwerk reich..." -- "Zu wenig Speicherplatz"
End


Markus

NewsArchive
05-07-2011, 06:16 AM
Hi Markus,

We don't have a drive available that has more than 2TB disk space free, so I
can't test it at the moment. The runtime calls "GetDiskFreeSpaceExA", so
perhaps it is a "calculation" problem.

What's your exact free disk space (in bytes) and what does the function
return in your case. We'll then try to run a simulation here with a "fake"
GetDiskFreeSpaceExA call.

Thanks,
Friedrich

NewsArchive
05-07-2011, 06:17 AM
See screen shot.

Markus Zander

NewsArchive
05-07-2011, 06:19 AM
Test script and result attached.

Markus Zander

NewsArchive
05-07-2011, 06:19 AM
>
> Test script and result attached.
>

Thanks for the screenshot. I think it's caused by a "calculation" error.
That function still uses (for unknown reasons) the wsprintf API, which does
not support 64-bit integers.

Thanks,
Friedrich

NewsArchive
05-09-2011, 01:31 AM
Fixed in the latest internal source code. Thank you.

---
FIX : (sync from SB8) [SB#105061] Runtime: The "Get System Info
(Free Disk Space)" script function did not return values > 2GB.
This might have caused problems on drives > 2TB.
---

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
05-18-2011, 12:56 AM
OK in 3325

Markus Zander