Page 1 of 1

Modify Features

Posted: Thu Mar 15, 2012 12:30 pm
by milhouse
Hi,

I'm actually having an issue with my setup. I have an installer with 4 features installing one file each, and what i wanted to do is once the product is installed, change my product to add or remove features. The only thing regarding this is that if the feature was already installed, i don't want the setup to reinstall it.

All this seems to work BUT for an unknown reason, it removes the file associated to the feature that is already installed. When i'm checking if the feature is installed or not, I use the saved information that Save Features Selection gave me. If the feature is already installed the only thing i'm doing is to show a messagebox and use the Writelog command (This works!). There is no Delete files or anything that could possibly delete the file associated to the feature.
Even in debug mode, it goes wrong.

To make it clear, here is an example:
Feature A > install file A
Feature B> install file B

Run the setup with only feature A selected > everything works fine

Run the setup again
Choose modify
Select Feature B (leave Feature A selected)
Got a messagebox with "Feature A is already installed" and write in log file
Install file B
Finish

After that go to Targetdir and there's only file B the file A just disappeared.

Hope that you can help,

Regards

Re: Modify Features

Posted: Fri Mar 16, 2012 9:16 am
by FrancescoT
Dear User,

if you try to replicate the same behaviour in a simple test project this happens?

I am asking this because for what I know, This should not happen.

let me know.

Re: Modify Features

Posted: Mon Mar 19, 2012 7:11 am
by milhouse
Hi Francesco,

I'm actually using the native engine setup provided by installaware.
I used the Save feature Selection to check whether or not the feature is already installed
So that, If the user selects a component that is already installed it won't be. Instead, the'll have a messagebox telling them tahat the feature is already installed on the computer.
As I already said, this part performs well.
But the files attached to this component, that is already intalled, will be uninstalled.
I can't figure out why, there is nothing in my code asking for this action.

Also, my other question is, is it normal when using NATIVE_ENGINE = TRUE before Install files command and set it up to FALSE right after that when call Unistall command those are not uninstalled?
Am I doing something wrong?

Regards

Re: Modify Features

Posted: Mon Mar 19, 2012 9:01 am
by FrancescoT
Let me check on it!

Regards

Re: Modify Features

Posted: Mon Mar 19, 2012 10:11 am
by bokkie
milhouse: "Also, my other question is, is it normal when using NATIVE_ENGINE = TRUE before Install files command and set it up to FALSE right after that when call Unistall command those are not uninstalled?"

Somebody might correct me but my understanding of it is that when you enable the native engine, all commands from that point onwards are executed immediately. That is, they are not sequenced for uninstallation as they were not written and sequenced initially using the Apply Install command. All so-called "purple" commands are added to the sequence and are executed only when installing and uninstalling, hence Apply Install runs the commands and you get the reversal during uninstallation. An exception would be if you mark the files as permanent. Once you've enabled the native engine nothing will be sequenced for uninstallation unless you handle that specific scenario.

Without the native engine set to TRUE, your setup will handle everything for you. In a sense, the native engine short-circuits the usual flow. You get the best of both worlds. :wink:

Re: Modify Features

Posted: Mon Mar 19, 2012 10:40 am
by FrancescoT
That's correct ... all the windows Installer flow it is completely unused with NATIVE ENGINE ON, so calling features that points to it can't work.

Thanks Peter!

Re: Modify Features

Posted: Thu Mar 22, 2012 4:07 pm
by milhouse
Hi guys!

Did you check for my first request? Just to make sure, what i want is to not Uninstall/Install a component that is already present in the system.
So far, even if i`m able to check that my component is already installed, and just prompt a messgebox and write in log file, all the the files associated to this component are deleted.

Any answer regarding this would be appreciated.

Thanks

Re: Modify Features

Posted: Fri Mar 23, 2012 11:34 am
by FrancescoT
Dear Milhouse,

could you provide me a simple test project, so that I can carefully check your question?

Regards

Re: Modify Features

Posted: Mon Mar 26, 2012 9:21 am
by milhouse
Thanks, but i was able to do it based on a document you provided on your website.

Is it possible to have the prerequisites installed only according to the feature selected?

Re: Modify Features

Posted: Mon Mar 26, 2012 11:30 am
by FrancescoT
Yes you can manage runtimes on feature condition.

Es:

Get Component Feature A\DX9 Selection State into Variable SELECTED
if Variable SELECTED Equals TRUE
Include Script: setupdx9b
end

In this case DX9 runtimeit is installed only if related feature it is selected.

Regards