We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

User defined property incorrect Uninstall for Multi-inst

Hi
I defined in the “Install Parameters” page a “Property” which will store the custom name that the user typed in during installation through a UI EditBox.
The installer is setup up for multiple instance installations.
During installation all works fine for all instances. Means the user types for each instance installation a different name and the installer handles it through that defined property correctly in all places (used for folder names as well as service name).
However, unfortunately during uninstall the installer does not 'remember' each individual entered name/property-value anymore, it 'remembers' only the name of the first installation! Consequently, of course the uninstallation is not running correct at all. It uninstalls the first installation OK but all others only partly.
Any suggestion how that could be done would be appreciated.
Thanks.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,

Can you please send us the .AIP (project file) to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behavior.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,

Can you please try to enable, for your defined property, the “Set persistent property” option in “Install Parameters” page and see if the behavior persist?

Please let us know if that helped otherwise give us more details.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

Hi
thanks for the hint, it seems it works slightly better but unfortunately still not as I would expect. Compared to before it now 'remembers' the last installed instance value of the property during uninstall.
Actually I figured out a bit more precise, it seems to remember the installed instance's individual value when it remove the installed file (means it deletes files in the correct directory) but interestingly it does not use the correct individual value when it is used as a parameter for a 'custom action' run exe (there it uses now always the last's installed value (see action 'unInstallServiceOnUninstall' in the aip)).

Further I noticed for "Multiple Instances", as suggested in the Help, I like to change the value for the ProductName so you can distinguish the different installed instance in the Control Panel -> Program List as well as for uninstall. However, there I place again this user defined property (the same as for above folder & parameter) but it never gets the individual value of it but this time it always has the mandatory default value (the value I had to set while building the install). Any suggestions for that?

Thanks for your help and efforts.


PS: I addded two uninstall log files of the 2nd & 3rd instances. Unfortunately for the uninstall of the first instance it seems it is not possible to write a log. Too bad also I can't find any log information about the run exe custom action in there :(
The typed value during installation for the defined user property was for the 2nd instance 'Q1' and for the 3rd instance 'P1'
Attachments
UnInstall.zip
(59.91 KiB) Downloaded 628 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,

In order to have the configuration for the actual structure of the folders from “Files and Folders” page you need to store the path of your property-based folders in the registry for each instance.

You can create two registries values, which will store your PROP_FOLDER_PATH and PROP_SHORTCUT_FOLDER property values, like this:
Name field: Reg_ PROP_FOLDER_PATH[InstanceId] – you ensure in that way that the registry name is unique.
Data field: [PROP_FOLDER_PATH]

Name field: Reg_ PROP_SHORTCUT_FOLDER[InstanceId]
Data field: [PROP_SHORTCUT_FOLDER]

Then you can define two registries searches (e.g SEARCH_PROP_FOLDER_PATH and SEARCH_PROP_SHORTCUT_FOLDER) for the registries values added in the above step.

In the "Custom Actions" page you should add two Set installer property custom actions, scheduled after your "CustShortcutFolder" custom action, like this:
Property: PROP_FOLDER_PATH
Value: SEARCH_PROP_FOLDER_PATH

Property: PROP_SHORTCUT_FOLDER
Value: SEARCH_PROP_SHORTCUT_FOLDER

Please note that these custom actions should run only on uninstall. So, from their "Execution Stage Condition" section you should check only the "Uninstall" checkbox. Also, you should edit your "CustShortcutFolder" and "CustApplFolder" custom actions to not be executed on uninstall (uncheck the "Execution Stage Condition -> Uninstall" checkbox).

If you need any help, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

Thanks a lot, that worked now with the Folders & Paremeter for the custom action executable!

Do you have also a solution to the mentioned Productname adjustment per instance?
> Further I noticed for "Multiple Instances", as suggested in the Help, I like to change the value for the ProductName so you can distinguish the different installed instance in the Control Panel -> Program List as
> well as for uninstall. However, there I place again this user defined property (the same as for above folder & parameter) but it never gets the individual value of it but this time it always has the mandatory default
> value (the value I had to set while building the install (T1)). Any suggestions for that?

One more question. During unInstall only 'untouched' files are removed. I'm sure there is an option to remove all files anyway, isn't it? I couldn't find any yet though.

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

Re: User defined property incorrect Uninstall for Multi-inst

Hello,
Do you have also a solution to the mentioned Productname adjustment per instance?
> Further I noticed for "Multiple Instances", as suggested in the Help, I like to change the value for the ProductName so you can distinguish the different installed instance in the Control Panel -> Program List as
> well as for uninstall. However, there I place again this user defined property (the same as for above folder & parameter) but it never gets the individual value of it but this time it always has the mandatory default
> value (the value I had to set while building the install (T1)). Any suggestions for that?
I'm not sure I fully understand your scenario. Can you please give more detailes about this(maybe exemplify)?
As far as I can see, you should have a different name in the Control Panel >> Program Files list for each instance. It should get the value which has been set in the Value: field from the instance properties. In order to edit this value you can select an instance, select the “Properties” tab and use the [Edit...] button to customize your instance.
One more question. During unInstall only 'untouched' files are removed. I'm sure there is an option to remove all files anyway, isn't it? I couldn't find any yet though.
I'm afraid this is the default behavior of the windows installer. As a workaround, you can go in the “Files and Folders” page, select the folder that you want to delete. Use the “Properties” toolbar button and in the new appreared window go in the “Operations” tab and enable the “Remove folder” option. Please make sure you have “Always remove folder (even if is not empty)” option selected for the “Operations” listBox option and select the “Component uninstall” option for “Remove On” listBox option.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

Hi
Thanks for the information.

Regards the Instance Property. What you explained is exactly what I did but my issue is that I placed the user entered Property as part of the Instance Property Value but this is not 'used' correctly there. It does not take the user entered value but always the property's default value.
I guess then that is not possible since the Instance values are probably set before any user interaction is done (enter a value) and not modifiable anymore later.

Regards removing all files on uninstall. I 'played' with your suggested Files and Folder 'Operations' again (I tried that already before) and found now a solution, although not very elegant.
The not so nice part is, that Uninstall only removes all files and folders when the defined 'Component' is removed. Further this 'Component' needs also to be somewhere in that Folder or Subfolders and of course must be 'untouched'. So when the Folder which should be removed does not contain any 'untouched' files, nothing will be removed. As a bit ugly 'workaround' for this I placed now a dummy file (as Hidden file) in that folder and used it as the 'Component' in the 'Operations' definition. Since that dummy file is of course never used and so also never 'touched', it works.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,
Regards the Instance Property. What you explained is exactly what I did but my issue is that I placed the user entered Property as part of the Instance Property Value but this is not 'used' correctly there. It does not take the user entered value but always the property's default value.
Please keep in mind this is the normal behavior. Also, please note that the "Value" field from an edit instance property dialog is of pseudoFormatted type and properties referenced by PseudoFormatted data types are resolved at build time while properties referenced by Formatted data types are resolved at runtime.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

I see, then I can't do what I liked to do but thanks for that clarification.

One others point. As you suggested, earlier in the post, I used Registry Entries and Searches. This works fine for my intention but one interessing thing I noticed. The Registry Values are set correct during the installation, for each installed instance a couple however, they are not removed from the registry during uninstall of the instance except, for the last instance I uninstall. For the last instance I uninstall, whatever instance it is, the corresponding Registry Values are nicely deleted (only the corresponding entries all other instance's entries stay in the registry).
This is not a big deal but it would be nice to remove the coresponding Registry Values on each instance's uninstall. Is that possible?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,

Can you please try to add the related registries components in the “Components” tab for each instance, and see if the behavior still persist? In order to achieve that you can go in the “Multiple Instances” page >> “Components” tab and use the [Add...] button to add the related registries components.
In this way a new component GUID will be automatically generated and the related per-instance registries should be uninstalled when an instance is uninstalled.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

Thanks for the hint but unfortunately it did not work. Still the same behavior.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hello,

I'm not sure why you encountered this behavior.
Can you please add all your components for each Instance in the “Components” tab and see if the behavior persist?

I have also attached a .zip archive which contains a sample.

Please keep in mind that if the related registry keys/values already exists on target machine before installation, then they will not be removed on uninstall.
So, please make sure the above registries are not on target machine before installation (you can manually delete them).

If you have any questions please let us know.

Best regards,
Dan
Attachments
sample_multiple_instances.zip
(3.77 KiB) Downloaded 430 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
luc
Posts: 17
Joined: Tue Jun 18, 2013 9:50 am

Re: User defined property incorrect Uninstall for Multi-inst

how did you get the 'InstanceId' as a Component? How can I add that you my Component List?
I have that not in the list I can choose from (nor the ProductInformation).
Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: User defined property incorrect Uninstall for Multi-inst

Hi,

Please notice that I have created a new Key under Current User/Local machine >> Software, in the "Registry" page using the [Add Key] toolbar button. You can take a look on the sample which I have attached in my previous post.

Let me know if you need any help.

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

Return to “Building Installers”