Announcement

Collapse
No announcement yet.

Getting size of file which is part of installer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting size of file which is part of installer

    How can one get the size of a file which is part of the NSIS installer, without using GetSectionSize() ? So let's say for example my installer would contain 2 files called "myApp.exe" (100 000 bytes) and "myPicture.png" (5000 bytes), I would like to be able to do something like GetFileSize("myApp.exe") and get 100 000 as result (which would be the amount of space the file would use if being on disk in the installation folder).
    This seems like a really simple thing, yet I couldn't find how to do it. I don't want to store the file to disk for being able to determine the size.

  • #2
    Put the file alone in a hidden unchecked section.
    IntOp $PostCount $PostCount + 1

    Comment


    • #3
      OK that worked. Thanks

      Comment

      Working...
      X