Hello,
In my setup, I have to conditionally delete some files on installation. The conditions are derived from the system configuration and set early in the execute sequence.
When I use the RemoveFile table for deleting the files, I have to create a separate component for each of them, because the conditions are not used elsewhere.
A first-time install with the condition evaluating to FALSE results in the file not being deleted, which is OK. The log file says:
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
How to delete a file on install?
Started by
Matthias1967
, Feb 10 2010 07:32
4 replies to this topic
Posted 10 February 2010 - 07:32
QUOTE |
MSI (s) (E4:D8) [06:56:25:265]: Component: DeleteMyFile; Installed: Absent; Request: Local; Action: Null |
When I start a repair or minor upgrade and the condition evaluates to TRUE (I checked in the log file that the corresponding property is set), I expect the file to be deleted. But it is not deleted, and the log file says:
QUOTE |
MSI (s) (70:6C) [07:22:10:593]: Component: DeleteMyFile; Installed: Local; Request: Null; Action: Null |
So what can I do to get this file reliably deleted if the corresponding condition is true? Can I achieve this using the RemoveFile table, or do I have to use a custom action here?
Regards,
Matthias
Posted 10 February 2010 - 18:40
Is the component set to "reevaluate condition"=yes ?
Stefan Krüger
InstallSite.org twitter facebook
Posted 11 February 2010 - 07:12
No, I have not done this so far.
As far as I have read Windows Installer documentation before, i have thought that this flag should hardly ever be used. Or, to put it the other way: What is the reason for not marking most components as "transitive"?
Best regards,
Matthias
As far as I have read Windows Installer documentation before, i have thought that this flag should hardly ever be used. Or, to put it the other way: What is the reason for not marking most components as "transitive"?
Best regards,
Matthias
Posted 11 February 2010 - 15:36
It depends on your desired behaviour. But I agree that transitive should be used in most cases (for components that do have a condition). Transisitive=yes is the same as reevaluate=yes, but InstallShield's default is no. This could be the cause of your problem.
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 March 2010 - 20:36
Hello Stefan,
this was not exactly my point.
Yes, InstallShield's default is transitive=no.
But Windows Installer documentation for the Component table (not InstallShield documentation) says
this was not exactly my point.
Yes, InstallShield's default is transitive=no.
But Windows Installer documentation for the Component table (not InstallShield documentation) says
QUOTE |
This bit should only be set for transitive components. See Using Transitive Components. |
And the entry "Using Transitive Components" says
QUOTE |
A typical use for transitive components is to prepare a product to gracefully reinstall during an upgrade from Windows 98 to Windows XP. |
i.e. something far from what I plan to do. This has sounded to me like Microsoft strongly advising against using the "transitive" Attribute, and this is why I have not dared to use it so far.
Best regards,
Matthias