cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
M_Madhusudana
Revenera
Revenera

XML File Changes does not change values when install is running in modify mode

I am using XML File Changes to edit some XML files that we install and it’s working fine - basically we have a custom dialog which prompts the user for, and reads in, a port number and database location which is then written to the XML files that they are specified in.

However, if we then run the installer again and choose "Modify" in the MaintenanceType dialog so the installer is in 'Modify mode' it does not seem to change these values again accordingly. This is a feature that we would really like – especially the ability to change the port that it’s listening in and an install modify would be a very clean way of doing this.

Looking in the built MSI there are no conditions on the IsXml{...} custom actions (i.e. ISXmlInstall, ISXmlRollBack etc) and in the log file they appear to run during the modify – but the xml files don’t get changed.

I can’t seem to find any settings for this and no real help on this – also I can’t find where anybody else has had this problem...

Here’s a bit of the log where the custom actions run, they appear to run as deferred custom actions but as I said don’t change the values accordingly:

Action 16:22:51: ISXmlUnInstall.
MSI (s) (9C:68) [16:22:51:989]: Executing op: CustomActionSchedule(Action=ISXmlUnInstall,ActionType=3073,Source=BinaryData,Target=ISXmlUnInstall,CustomActionData=C:\Users\Admin\AppData\Local\Temp\XML1F83.tmp)
MSI (s) (9C:80) [16:22:51:989]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI2051.tmp, Entrypoint: ISXmlUnInstall
MSI (s) (9C:C4) [16:22:51:989]: Generating random cookie.
MSI (s) (9C:C4) [16:22:51:989]: Created Custom Action Server with PID 2356 (0x934).
MSI (s) (9C:8C) [16:22:52:036]: Running as a service.
MSI (s) (9C:8C) [16:22:52:036]: Hello, I'm your 32bit Elevated custom action server.
MSI (s) (9C:68) [16:22:52:067]: Executing op: ActionStart(Name=ISXmlInstall,,)
Action 16:22:52: ISXmlInstall.
MSI (s) (9C:68) [16:22:52:067]: Executing op: CustomActionSchedule(Action=ISXmlInstall,ActionType=3073,Source=BinaryData,Target=ISXmlInstall,CustomActionData=C:\Users\Admin\AppData\Local\Temp\XML1F83.tmp)
MSI (s) (9C:B4) [16:22:52:067]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI20A0.tmp, Entrypoint: ISXmlInstall
MSI (s) (9C:68) [16:22:52:083]: Executing op: ActionStart(Name=RegisterProduct,Description=Registering product,Template=[1])

Anybody got any ideas?

Am I missing something or is this a bug\"feature" that this does not work in Modify mode?
Labels (1)
0 Kudos
(3) Replies
skolte
Level 7

When you initially accept the port value from the user, are you storing it somewhere so that when running in Modify mode your installer can load the same value or accept it from user again and reuse it?
If that's not happening perhaps that could explain the behavior you see.
0 Kudos
hidenori
Level 17

The XML File Changes are explicitly tied to component states. In cases where the underlying component thinks it needs to install, the XML File Changes will also install. If you generate a verbose log file for your installation when running in maintenance mode, you may be able to find some information as to why the components think they do not need to install.
0 Kudos
flagrant99
Level 3

I am running into the same issue. How do I make a component get marked for re-install. I moved the XML File Changes Components into their own feature and added the feature name to the REINSTALL property but still nothing. In the Log the component is Installed: Local.
0 Kudos