cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vikram
Level 3

XMLfile changes by user input while installation runs

Hi I am new to Installshield (Using IS2013 premier trail version)....

My problem goes like....
I have an IS project(Basic MSI) which also deploys website in IIS and this website has web.config file which holds the connection string.
The project generates single file as setup.exe so while installation the all the files including XML file are encapsulated in setup.exe.

Now I want user to input values(while installation progresses) which create connection strings and replace the user input value in web.config file....

Can you please let me know if at all is it possible to do(even in trail version).. and if it is how should I create dialog and take user input and update the file.....So far I am able to import the config file in
XML File Changes view

Also please let me know to create and the dialog and read the user input.

please provide your inputs...
Labels (1)
0 Kudos
(2) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

There are a lot of subtleties to doing this fully correctly, so I'm going to give you a quick overview of the bare minimum you'll need to verify this works.
[LIST=1]
  • In the Dialogs view, add an edit box to, say, the InstallWelcome dialog
  • Tie that edit box to a public property (all upper-case) such as MYCONFIGOPTION (this will also add this property to SecureCustomProperties)
  • Reference that property in your XML File Changes view, e.g. with [MYCONFIGOPTION]

    You can then extend this to handle however much more you want. In a more realistic case, you will probably want to create your own dialog and sequence it using the Dialog Wizard, or manually by editing Control Events and changing the arguments to NewDialog on the Next and Back buttons. You may want to provide a default value, either hardcoded, or by performing a system search to look up the current value.

    Also note that you should avoid importing the whole XML file into the XML File Changes view, and instead should only import the elements or attributes you wish to modify. InstallShield will then install the file and apply the requested modifications.
  • 0 Kudos
    vikram
    Level 3

    MichaelU wrote:
    There are a lot of subtleties to doing this fully correctly, so I'm going to give you a quick overview of the bare minimum you'll need to verify this works.
    [LIST=1]
  • In the Dialogs view, add an edit box to, say, the InstallWelcome dialog
  • Tie that edit box to a public property (all upper-case) such as MYCONFIGOPTION (this will also add this property to SecureCustomProperties)
  • Reference that property in your XML File Changes view, e.g. with [MYCONFIGOPTION]

    You can then extend this to handle however much more you want. In a more realistic case, you will probably want to create your own dialog and sequence it using the Dialog Wizard, or manually by editing Control Events and changing the arguments to NewDialog on the Next and Back buttons. You may want to provide a default value, either hardcoded, or by performing a system search to look up the current value.

    Also note that you should avoid importing the whole XML file into the XML File Changes view, and instead should only import the elements or attributes you wish to modify. InstallShield will then install the file and apply the requested modifications.



  • Hi Michael ,

    Thanks for your reply.
    I have an issue with creating dialog which goes like I created a new dialog(tried with Blank/skinnable/script based) now I added a text field in that. now clicking that text field in the Dialog I am npt able to see anything named as "Propety" in the right pane. So I tried putting the property as [MYPROPERTY] in the column for name but there is doesn't allow to put.

    Can you let me know whether is it a problem with evaluation version or is there some where else I should search for property thing.

    Thanks.
    0 Kudos