Announcement

Collapse
No announcement yet.

Questions about Return Code 130 - Not enough free disks space

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

  • Questions about Return Code 130 - Not enough free disks space

    Hi,

    A couple questions around how SUF calculates and and evaluates space requirements for determining when to issue Return Code 130 "There is currently not enough free disk space on the target drive." I tried searching the forums and didn't come up with answers.

    First, where can I find the amount that SUF is using for that determination? I hoped it would be reported in the Project Report but I did not see it there.

    Second, in some instances we use a common SUF for both new installation and update installation. Is there a way I can adjust how the evaluation for Return Code 130 is processed in the case of doing an Update installation, when I know that many files will be replaced by similarly sized new versions of themselves?

    Thank you.

    Greg

  • #2
    Okay - answering a little of my own question here.

    We already use _SpaceRequired after the user selects the install folder and perform our own check there and provide friendly guidance. I imagine SUF runtime is using the same value for determining when to return 130.

    When we are in "Update Mode" we skip some screens, including the screen prompting for installation location and hence our own friendly check.


    I think that answers my First question. Still would appreciate guidance on my second one though, please.

    Greg

    Comment


    • #3
      The action SetupData.CalculateRequiredSpace() calculates the amount of disk space needed by the setup at it's current state, with the variables, packages, etc. as they are at the time that the action is called.

      You can use this action at any moment (at runtime) to check the amount of space Setup Factory has calculated for the deployment of the currently selected files, packages and additional space you may have specified in the packages properties. If files are about to be overwritten, reducing the actual amount of space on the target device, you can tweak the calculation by adding a negative value to the additional disk space for the package, via SetupData.SetPackageProperties().
      Code:
       nBefore = SetupData.CalculateRequiredSpace();
      -- reduce the required amount of disk space by 3000000 bytes
      SetupData.SetPackageProperties("Package01", {AdditionalDiskSpace=-3000})
      -- Test for error
      error = Application.GetLastError();
      if (error ~= 0) then
          Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
      else
          nAfter = SetupData.CalculateRequiredSpace();
      end
      Click image for larger version

Name:	SCRN-2021-08-10-01.png
Views:	175
Size:	29.9 KB
ID:	307428

      Ulrich

      Comment


      • #4
        Thanks as always Ulrich. We'll account for our space required difference on an "Update" manually using the technique you outlined.

        Greg

        Comment

        Working...
        X