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!

MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

xml file save BEFORE service starts

Hello,

I have a SERVICE installer that reads and writes an xml file...

it reads the file fine... that isn't a problem...
it writes the file fine... that isn't the problem.

The problem is WHEN the file is written. My service depends upon the contents of the XML file that is written to disk by the installer. It seems the file is written AFTER the service is started.

Is there a way to write the xml file sooner than when the service is started by the installer?

Thanks
Mike

I can attach a project... but I think this is generic enough for you to grasp what I am talking about.
Horatiu
Posts: 42
Joined: Tue Nov 29, 2016 1:19 pm

Re: xml file save BEFORE service starts

Hello Mike,

If you are using the edit XML functionality for Advanced Installer (Edit XML), you can check the install execution sequence by going to the Table Editor tab from the left pane, and select the InstallExecuteSequence table. You can search (Filter rows - upper right corner) in the table for “XML” and “Service” to see their sequence numbers, the lower the number the sooner it is executed. Just make sure that the XML is created before your Service (Table editor), by changing their sequence number. Be sure you don't overwrite an existing value.

Let me know if this solves your issue

Best regards,
~Horatiu
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: xml file save BEFORE service starts

Thanks...

How do I know what entry does what?

I think the highlighted values are to install the service and start the service... but what is the XML save file called?
TableEditor.PNG
TableEditor.PNG (29.69 KiB) Viewed 5557 times
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: xml file save BEFORE service starts

I found this, but I don't see it in the "InstallExecuteSequence" ... could that be the issue?
xml_commit.PNG
xml_commit.PNG (14.55 KiB) Viewed 5557 times
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: xml file save BEFORE service starts

I have added this to the "InstallExecuteSequence" table ( will test and let you know the results )
xml_CommitAdded.PNG
xml_CommitAdded.PNG (23.08 KiB) Viewed 5557 times

RESULTS:

File is not in directory when service starts
MLiss@Cetrus.com
Posts: 366
Joined: Wed Dec 30, 2015 5:40 pm

Re: xml file save BEFORE service starts

I found the reason...

The value in the AdvancedInstaller editor allows NON-.net boolean values of True and False, instead of only allowing true and false
in the "Argument:" edit box:
boolean_value.PNG
boolean_value.PNG (35.56 KiB) Viewed 5556 times
I think the only way you could prevent this from happening is to enforce strict type checking of arguments based on the underlying type.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: xml file save BEFORE service starts

Hello Mike,

I've talked with our development team about your requirement and it seems this is not possible due to the actual implementation of our XML custom actions. The effective XML content is written by the "AI_XmlConfig" custom action, but this custom action is scheduled and called by the "AI_XmlInstall" custom action at install time. The "AI_XmlConfig" custom action cannot be manually configured in the "InstallExecuteSequence". It is not compatible to be manually configured.

Unfortunately the only way to achieve what you need will be to create your own custom action which manipulates XML files.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”