InstallShield with XML web.config - changing the connection string

Posted on 2009-02-19
Last Modified: 2013-11-14
I'm using InstallShield 2009 and I cant for the life of me dynamically change the connection string in the web.config file - heres what I'm currently doing..

I have an SQL log-in dialog box where i enter in all of the SQL database log-in credentials, and in the "XML File Changes" section i'm loading my web.config values. Under connection string I'm making it equal to


When the installer runs, it changes the value but I end up with

<add name="MyConnectionString" connectionString="" providerName="System.Data.SqlClient"></add>

i.e. a BLANK connection string!

Can anyone tell me how to make the change so that it applies properly to the connectionString? All help appreciated...
Question by:DevSure
    LVL 40

    Expert Comment

    by:Vadim Rapp
    I would start with finding out if those properties - IS_SQLSERVER_SERVER etc. - are actually populated.

    One quick way to do that is putting new textbox on the "ready to install" dialog, with the value being what you want to see.

    Author Comment

    Thanks for your prompt response.

    I've managed to open the msi debugger and attempted to load the variables and the whole prog crashed, is there a intermediate window/watch list similar to visual studio? Failing that is there a lookup table that shows you the current value of the variables?

    LVL 40

    Accepted Solution

    Debugging is what's supposed to help here, but if it crashes, then it crashes. Besides, Installshield is so tightly stuffed with its own internal junk that I imagine it would be nontrivial to figure out what to look at even if it worked.

    Put your connection string with those variables on the dialog as textbox so it shows the result.

    Author Comment

    Cheers, got it working after you helped me out with the dubugging. turns out the problem was that there was a script changing the value to its md5 value....

    Thanks for your help, I'll need it with InstallShield I'd say!

    Author Closing Comment

    Thanks, just getting used to the app so needed a bit of help! A+

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Among others, I monitor the Windows Installer zone and Installer zone. I find that many of the questions could be answered much more quickly if a Windows Installer verbose log were submitted with the question.   However, I do not always have t…
    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 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

    23 Experts available now in Live!

    Get 1:1 Help Now