I have built an installer to install application using inno setup.But i want to display an error message showing that there is not enough space in the drive or path where i
Maybe my answer looks like off-topic. I had more or less the same problem.
If you have in the files section a check function made by yourself, setup can only count the number of (Mega)bytes of those files which have "normal" check flags.
A way to avoid this is count-up the bytes by yourself and put the result in the ExtraDiskSpaceRequired directive in the [setup] section