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

IS 2016 SP2 / XML File Changes, Rule creates second ConnectionString entry

Using IS 2016 SP2 Professional, on XML File Changes, I have a rule to "update" the ConnectionString entry on the web.config file, but instead of updating, it creates a second entry when run from UI or command line, see settings on images attached.

The value for the ConnectionString key is "DATA SOURCE=[DATABASE_SERVER];INITIAL CATALOG=[DATABASE_NAME];UID=[DATABASE_USER_NAME];PWD=[DATABASE_PASSWORD];"

The property names (DATABASE_SERVER, DATABASE_NAME, DATABASE_USER_NAME and DATABASE_PASSWORD) have default values defined on the ISM file and the UI captures the values during installation, but it creates a second entry instead of updating existing entry.

When we run the installer from command line, see below, it also creates a second ConnectionString entry.

installer.exe /s /v"/qn INSTALLDIR=C:\inetpub\wwwroot\app-name"

Ideally, (1) we want the installer to capture the entries for the ConnectionString in the UI and update it properly on the web.config file.

(2) When installer is run from the command line, we need to skip the "XML File Changes" step and leave the ConnectionString in the web.config as is.

Is the above 2 points possible?

 

 

Labels (1)
0 Kudos
(5) Replies
UtsabKarmakar
Level 5 Flexeran
Level 5 Flexeran

Hi @neualex ,

This should be easily possible. I have tried it and it seem to work as you are expecting.

I guess you have to provide the following for ID_STRING84 and not the entire string as the value will be picked from the attribute table:

add[@key and @value]


Thanks

0 Kudos

UtsabKarmakar,

I inherited this template, what role does ID_STRING84 have here?

Is there any way to bypass the "XML File Changes" step when running the installer from command line?

Maybe by passing a parameter and such parameter is ready at the "XML File Changes" step and decide whether or not run the XML File Changes?

0 Kudos

Hi @neualex,

I inherited this template, what role does ID_STRING84 have here?
 -- In your project ID_STRING84 stores the Element Name (as per the attachment). Try changing the content of ID_STRING84 to add[@key and @value] should solve your problem.

Is there any way to bypass the "XML File Changes" step when running the installer from command line?
 -- Running from command line or executing by double clicking the installer will always execute "XML File Changes". Unless you have added condition, in which base on the condition passed XML File Changes is either executed or not.

Maybe by passing a parameter and such parameter is ready at the "XML File Changes" step and decide whether or not run the XML File Changes?
 -- Yes you can set a condition and then based on that condition it can decide whether or not to execute XML File Changes. You can pass the condition as a parameter from command line.

 

Thanks

0 Kudos

-- In your project ID_STRING84 stores the Element Name (as per the attachment). Try changing the content of ID_STRING84 to add[@key and @value] should solve your problem.

>Where do I find ID_STRING84? It is not listed on the Property Manager grid.

-- Yes you can set a condition and then based on that condition it can decide whether or not to execute XML File Changes. You can pass the condition as a parameter from command line.

>Please refer to KB article on this.

PS.

#1, I need to change the email address on my account from my personal to my work email address, but it says it is already in use, my work email is alexc@infolinx.com

#2, How can I request remote support to look into this question?

0 Kudos

Where do I find ID_STRING84? It is not listed on the Property Manager grid.
 -- You can find the ID_STRING84 under User Interface > String Editor 

Please refer to KB article on this.
 -- Not sure if such KB exists.

But what you can do is, create component (for the example I have taken 2 components) and assign condition to  the Components (below) and assigned the feature "XMLFileChng" to XML File Change.

 

1.png

During installation from command line pass:
setup.exe /v"XMLINSTALL=1" to install XML File Changes for component NewXmlFile.xml

setup.exe /v"XMLINSTALL=2" to install XML File Changes for component NewXmlFile1.xml

 


#1, I need to change the email address on my account from my personal to my work email address, but it says it is already in use, my work email is alexc@infolinx.com

#2, How can I request remote support to look into this question?

You need to raise a support ticket.
You can get the details from the following links depending on your region:
https://community.flexera.com/t5/Support-Information/Support-Contacts/ta-p/94720
Or you can also contact via mail, support@flexerasoftware.com.

 

0 Kudos