Selectively paste-over XML template files? - Advanced Installer Community

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!

AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Selectively paste-over XML template files?

Here is my original question;
---------
From;
http://www.advancedinstaller.com/forums ... =2&t=18435
I'm working on perhaps a similar issue. My goal is to have a set of files that represent choices and then paste the appropriate choice's copy into the proper folder.

For example:
destination = c/programFiles/myorg/myapp/customizedFolder/file.txt (this is the base case file)
input possibilities = from my local drive, /Question1FileOptions/ has file1.txt, file2.txt.
Once the questionnaire is done, if choice 2 is made, I should have ;
destination = c/programFiles/myorg/myapp/customizedFolder/file2.txt.
---------
I was requested to clarify it. Here is a concretized example, maybe it helps?
Say we have an XML file with several sections. One section has machine-specific configs. I'd essentially like to use XSL to find that node in my app.config XML file and replace the machine-specific section according to what machine the user says. So;

Installer asks user; What machine are you on? Choices are: HERE or THERE.
user replies: THERE.
Installer then pulls out the machine configuration section from my app.config and replaces the node's content with the proper settings for THERE. Machine settings might include lots of different settings, not just one item. Each of course is just key/value.

I'm a n00b and do not know how to do any part of this :). I have the trial version as well, so possibly I am missing the proper XML edit feature because we have not paid for it?
thank you so much !!
Anne

ps For my reference: Google-TIP: To search this domain for a specific string, here's an example;
http://www.google.com/search?q=install+ ... mages&tbs=
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Selectively paste-over XML template files?

Hello,

Thank you for your interest in Advanced Installer.

To make things simpler, I recommend this approach for a Professional project type:
- create a configuration XML file for each OS
- follow this article to add the files to your project
- follow this article to set the appropriate condition for each file( the package can automatically detect the OS and there is no need for the user to input this information at install time )

The XML Editor is available starting with the Enterprise edition, so if you need to use that, you will need the Enterprise project type. Here are the top features categorized depending on the project type.

During the trial period all the features of Advanced Installer are available for your evaluation depending on the project type, so there is no need to worry about this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Selectively paste-over XML template files?

Thank you Mihai! We ordered Enterprise edition yesterday. Your great support on this board as well as the nice tutorials and documentation were major selling points.

I had made an Enterprise project, but the XML editing seemed to be manual, ie I pick a node in the AdvancedInstsaller GUI and manually type in the new value. Was I missing something? So then I was worried if I did it that way that I would have to retype new values for each "operating system" aka "machine."

I didn't see a way to get a log of what I input, to double check my work and make sure I typed it correctly?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Selectively paste-over XML template files?

Hello,

The suggestion from my previous post doesn't imply using the Advanced Installer XML Editor. As I mentioned can be implemented from a Professional project type and it is simpler.
I only mentioned the Enterprise project type with XML Editor for your future reference only.
- create a configuration XML file for each OS
To implement this first step from my previous post, you can create/edit the XML configuration files outside Advanced Installer.
I didn't see a way to get a log of what I input, to double check my work and make sure I typed it correctly?
If you modify any XML file from the Advanced Installer project GUI, it will be modified to the new values at install time and you can see the result by opening the file after installation.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AnneTheAgile
Posts: 61
Joined: Wed Jun 08, 2011 9:53 pm

Re: Selectively paste-over XML template files?

Whoops I'm sorry I didn't read carefully enough. All operating systems are the same in my case. The differentiator is what the person says is their context. I said machine and the differences are location-based, but we do need to have if-then selectors.

That is the hardest part, so I hope to hear from you again today :). I already saw how to add files. I was not able to add them conditionally, and I also haven't yet set up a question whose answer I can use. All pointers will be appreciated!

Return to “Common Problems”