bdhobbs
Posts: 15
Joined: Fri Apr 29, 2022 4:24 pm

Wanted to know how to add slack space to file cost

Hello,

This is similar to viewtopic.php?f=5&t=51161&p=129622&hili ... ng#p129622, but I didn't want to hijack someone else's post.

Here is the scenario:

Our application has been around for quite some time, and we save off a lot of data in .sdf files in the ProgramData directory.

To ensure that the user has adequate space when they upgrade (and migrate data), we need to sum the .sdf file sizes and multiply by a factor of 4 and add that to the file cost of the installed components.

What is the best way to approach this?

Thanks,
Bryan
bdhobbs
Posts: 15
Joined: Fri Apr 29, 2022 4:24 pm

Re: Wanted to know how to add slack space to file cost

I found a different approach for this, by just computing free space available using powershell in a Custom Action. I did find the ReserveCost table as a possible solution, but it seems the files would already have to be in the component list with their sizes and it didn't allow for me to change it programmatically, nor should I probably do so in the first place.

Thanks,
Bryan
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Wanted to know how to add slack space to file cost

Hello Bryan,

Thank you for your followup on this and for sharing your solution with us.

I am sure other users facing a similar scenario will find this useful in the future.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”