I need to edit an existing xml file during the installation process. I'm aware of the EditFile plugin but I don't think it'll work for this.
The file I need to modify is part of the Microsoft SQL Reporting Services installation (rssrvpolicy.config - copy is attached also).
I need to add about 9 lines of text in a certain place in the file like this:
PublicKeyBlob="00240...shortened for this post"
/>
</CodeGroup>
****NEW LINES WOULD GO HERE*****
</CodeGroup>
</CodeGroup>
</PolicyLevel>
</policy>
</security>
</mscorlib>
</configuration>
(not sure the above will line up right...the attached file shows it better).
Does this make sense? Is this possible without writing a custom vbscript or similar?
Thanks.
File Attached:
rssrvpolicy.config
File Attached:
rssrvpolicy.config.txt
File editing question...is this possible?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
You could use looping constructs and Read from Text File, Write to Text File commands, along with If for determining when you're at the end of the file and at the insertion point, to get this done.
Basically, read from the original file, write into a copy, add the extra text into the copy, and continue reading from original file until it ends; then replace the original with the copy.
Basically, read from the original file, write into a copy, add the extra text into the copy, and continue reading from original file until it ends; then replace the original with the copy.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 91 guests