Controlling ARP from IA (add/remove prg)

Got a problem you cannot solve? Try here.
deploy
Posts: 30
Joined: Mon Jan 14, 2013 1:39 am

Controlling ARP from IA (add/remove prg)

Postby deploy » Tue Jan 29, 2013 2:56 am

Hello,

What are the methods to decide if my IA setup gets an entry for uninstallation under Program and Features (Add/Remove Programs)? I would very much like to be able to control this in my setups.

For example:
I have a IA setup which installs 3rd party software and then make adjustments and settings for the 3rd party product to function properly. My setup uses NO purple commands, but I want an entry under programs and features to uninstall the settings my setup has applied using non-purple commands (and possibly remove 3rd party software if still installed).

The only way I have found to get an uninstall entry is to do a "Apply Install" in my setup.

This works and I do my clean up just fine during uninstallation, but IA will in GUI mode throw an error in the end of the uninstallation (Apply Uninstall) "action only valid for products that are currently installed", which makes some sense since I have not used any purple commands.

On the other hand, if there is nothing to uninstall why not just be quiet about it and remove the entry from Program and Features? After all, exit code is "0" when run silent and Apply Install did not complain..? I am left with an entry in Program and Features which can not be removed by my setup. (I tried ABORTONERROR=FALSE without success, if I remove Apply Uninstall there is no error when in GUI mode but my entry is left in ARP)

In another project I want to do the opposite: I have an IA installer which DOES use purple commands but I do NOT want an entry for uninstallation in Program and Features (at least not one that is visible).

If I could chose to set DisplayName for the entry to "" it would make the entry at least invisible, but this property is not available in project design -> ARP in IA.

How can I control what gets into ARP/is displayed from my IA installer?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Controlling ARP from IA (add/remove prg)

Postby FrancescoT » Tue Jan 29, 2013 4:17 am

Dear User,

It is as you said. To have an installation listed in ARP you should call "Apply Install".
With the opposite scenario where you don't want the installation listed in ARP, don't call "Apply Install".

However, with this last case you should use IA NATIVE ENGINE feature in order to have (if used ) Windows Installer commands (purple commands) working.
This because with MSI engine, Windows Installer commands are deferred to "Apply Install" effective execution.
In this case to force Windows Installer commands immediate execution, you can take advantage of NATIVE ENGINE capabilities.

To activate NATVE ENGINE use a call to;
Set Variable NATIVE_ENGINE to TRUE
and to restore back the default IA behaviour use;
Set Variable NATIVE_ENGINE to FALSE

Regarding the possible problem you have with the error, "action only valid for products that are currently installed", I suspect that exist something else causing the error and it is not caused because you are not using Windows installer commands.

You can easly verify it by creating a new project from scratch using the IA Basic Template for example.
If you just build & run the project, it will be installed and removed correctly ... even if the package doesn't install nothing.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

deploy
Posts: 30
Joined: Mon Jan 14, 2013 1:39 am

Re: Controlling ARP from IA (add/remove prg)

Postby deploy » Tue Jan 29, 2013 6:08 am

Thanks Francesco, excellent answer which makes much sense. I doubt I had made the connection to use native engine for my second scenario anytime soon reading on my own!! I was under the impression from reading help file -> Apply Changes was mandatory even with native engine but I see now after your explanation that it isn't - excellent!

Re: my error on Apply Uninstall, I am able to reproduce this.
New empty basic setup, remove the "create shortcut" (purple) under first time installation.
Install on clean test machine, then chose uninstall via Program&Features (Win 7x64) and I get (with quotes):
"This action is only valid for products that are currently installed." Please check your settings and try again.

And the entry for my test application is left in ARP.

I am using IA 15 (11.20.12)

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Controlling ARP from IA (add/remove prg)

Postby FrancescoT » Tue Jan 29, 2013 10:13 am

Dear User,

yes you are right, using the MSI engine with insallation package at least a single Windows Installer command should be called, otherwise the setup fails.
But this error should happen during package installation and the installation should not complete.
With my verification the package it is not installed due the installation failure (not added to ARP list) and seems strange to me, that you was able to complete its installation (because you have it listed in ARP).

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

deploy
Posts: 30
Joined: Mon Jan 14, 2013 1:39 am

Re: Controlling ARP from IA (add/remove prg)

Postby deploy » Tue Jan 29, 2013 12:07 pm

Hello once again :)
So the answer to my first scenario is:
even though I do not need to install anything I must use a purple command to get something in ARP?
Is this a limitation of IA or Windows Installer? Would it be possible to add a feature to add an ARP without installing a bogus file or registry key?

Also, it would be nice to be able to change "DisplayName" in ARP from within IA, now that I am all about new feature requests anyway :D

I am writing away from my IA-machine right now, but I verified the behavior I described 3-4 times before posting. After your reply I created yet another basic setup (template) just to be sure.
It installs fine on Win 7 x64 but cannot be removed. I can triple check and e-mail you a complete project with .exe if you'd like to follow up? Just let me know.

EDIT: Verified this morning. On Win XP x86 it terminates with error 2728 (code unavailable in "net helpmsg"), I guess you tested on a XP machine?
On Win 7 x64 it installs without problem but cannot be removed. Both machines tested where fully patched and otherwise "clean".

Regards

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Controlling ARP from IA (add/remove prg)

Postby FrancescoT » Thu Jan 31, 2013 10:39 am

Dear User,

even though I do not need to install anything I must use a purple command to get something in ARP?

Yes, this is required. At least something must be installed in order to have the package listed in ARP.

Is this a limitation of IA or Windows Installer? Would it be possible to add a feature to add an ARP without installing a bogus file or registry key?

The problem stay with the fact that if a package is listed in ARP, it means that something related to this package has been installed. If nothing has been installed ... there is nothing to remove and then consequently, the package will be not listed. To have a package listed, you should at least to perform an action that can traced and associated with the installation process. The actions that are capable to leave a tangible track of target system modifications, are those available as Purple Commands (Windows Installer Commands) and this is the reason why, you should at least use one of those available commands.

Also, it would be nice to be able to change "DisplayName" in ARP from within IA, now that I am all about new feature requests anyway

The displayed name in ARP is the name (TITLE) of the InstallAware project and I believe that will be not possible to have in future an IA command to modify it. However, I never tried, but you could modify the reference name stored in window registry ... even if it is not a recommended practice.

Anyway, I suggest you to try with the possibilities offered by InstallAware Native Engine in order to achieve your specific need.

For example;
I you repeat your last test enabling the NATIVE ENGINE at the very beginning of your script ... you will not receive that error, however the package will be not listed in ARP (due the above considerations).

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 50 guests