Edit .xml File in Wise 9

Posted on 2009-12-18
Last Modified: 2013-11-14
I need to set a couple of items in a .xml file as as variables so when my compiled Wise install runs, it will poplulate the variables with settings.  I can't seem to find a way to edit the text in the .xml file to set the 2 items as variables.  Does anyone know if this can be done and how to do it?
Question by:RyanEmporos
    LVL 8

    Expert Comment

    I would suggest using a WiseScript within your MSI.  In WiseScript, simply use the "Insert Line into Text File" Action to update your XML.  You can tell the WiseScript to "Replace" a line that starts with your XML line that you want to update/replace.  

    If you want to "Read" the values from your XML and update your MSI, the WiseScript will do this as well.
    Also, WiseScript can Read/Update/Set MSI Properties so it shoud be easily intergrated.

    BTW, are the variables you trying to configure custom ones or ones that already exists?  You really wouldn't want to go statically setting "Automatic Runtime" variables.

    Author Comment

    Thank you for the response Mirfster.  I'll try it out and let you know what happens.
    LVL 8

    Expert Comment

    Not a problem.  If you need any assistance with creating the WiseScript, feel free to ask.
    LVL 40

    Accepted Solution

    see article "Editing XML Files During Installation " in Help. See the picture. There you put the variables in square brackets.
    LVL 8

    Expert Comment

    You know, in all my years of using Wise Studio I never even thought about having it edit an XMLl file.  New one on me.  Nice info vadimrapp1. :)

    Author Closing Comment

    Thanks for your help!!!!!!

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    MaxSpan challenge 9 50
    squareUp  challenge 22 81
    Enhanced For loop vs ForEach Loop 4 42
    find a node in VST 2 36
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now