Uninstall routine - Page 2 - Advanced Installer Community
MichaB
Posts: 18
Joined: Mon Oct 28, 2013 7:44 am

Re: Uninstall routine

Hi,
I need to know how I can reserve additional Space for my SQL Server component only if a install parameter property has a specific value.
If the property is set to false no space should be reserved.
This is important because otherwise the VolumeCostList of the FolderDlg will have an incorrect value.

Regards,
Michael
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall routine

Hi Michael,

When you reserve additional disk space for a component a new entry is automatically created in the ReserveCost table, so you cannot condition this Reserving cost process through a property state.

Please note that the disk space will be only reserved based on the feature action(it is selected to be installed or not) which contains the related component.

If you want to ensure that you will always reserve additional disk space for a component (e.g. sql) no matter it will be installed or not, then you can disable its "Reserve additional disk space for this component" option and create a 'dummy' resource (e.g. registry entry) which will always be installed and will have the reserve additional space option enabled. In this way, no matter your sql component will be installed or not, you will always have the additional space reserved through the dummy resource component.

Please let us know if that helped, otherwise give us more details about your specific scenario.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MichaB
Posts: 18
Joined: Mon Oct 28, 2013 7:44 am

Re: Uninstall routine

Hi Dan,
of course I can add a dummy ressource and reserve additional space disk. (4 Gb for SQL Server).
But if the user choose not to install the SQL Server the user will see in the FolderDlg the 4 GB reserved in the VolumeCostList.

Regards,
Michael
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall routine

Hi Michael,

As I mentioned in my previous post, the disk space will only be reserved based on the feature action(it is selected to be installed or not) which contains the related component. Also, the additional disk space will be displayed in the Volume Cost List control only if the user select to install the related component for which you reserved the additional space.

Can you give us more details about your scenario (maybe exemplify)? Is the added additional space still displayed in the Volume Cost List control even if the related component is not selected for installation?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MichaB
Posts: 18
Joined: Mon Oct 28, 2013 7:44 am

Re: Uninstall routine

Hi Dan,
I have created a new Feature SqlServer that has the flag "Always install this Feature".
This Feature has the component Path_SqlSrv which reserves 2 GB space.
SqlFeature.PNG
SqlFeature.PNG (37.52 KiB) Viewed 4292 times
The Feature has the condition SQLDBTYPE = "New". SQLDBTYPE is a Radio button Group.
"New" is the Radio button that determines to install SQL Server. The other Radio button "None" is flagged if no SQL Server should be installed (you can see it in the Screenshot).
sqlraddiobuttons.PNG
sqlraddiobuttons.PNG (33.37 KiB) Viewed 4292 times
The Setup always Shows me 2 GB reserved in the VolumeCostList it doesn't matter if "None" or "New"-Radio button is checked.

Edit: Is it possible to set a Feature to be installed with a button click?

Regards,
Michael
MichaB
Posts: 18
Joined: Mon Oct 28, 2013 7:44 am

Re: Uninstall routine

Hi Dan,
I found the solution.
I use the custom Action "Install one or more Features locally" for the first Radio button and "Uninstall one or more Features" by the other Radio button and it works.
Thank you for your advise!

Regards,
Michael
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall routine

Hi Michael,

Here's another approach:

In order to display the required space in a Volume Cost List control you need to add a published event to refresh the dialog after modifying properties that were used on that dialog.
Unfortunately, you cannot add a published event on a Radio Button Group control. RadioButtonGroup controls only set property values and cannot be used to send a ControlEvent. This is a Windows Installer limitation. You can take a look on the RadioButtonGroup Control article.

However, you can achieve the desired behavior by using the check box control which allows you adding published events.

I've attached a .zip archive that contains a sample which implement your scenario.

If there is anything I can help with, please let me know.

Best regards,
Dan
Attachments
Sample CheckBox AI_10.3.zip
(3.61 KiB) Downloaded 218 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
MichaB
Posts: 18
Joined: Mon Oct 28, 2013 7:44 am

Re: Uninstall routine

Hi Dan,
thank you very much. It works!

Regards,
Michael
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Uninstall routine

You're welcome Michael.

If there is anything I can help with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”