Cpo Design

NSIS and updating xml file

Pavel Svarc Wednesday, February 24, 2016 12:11 PM

How to update xml as part of installation.



I have a installer that installs my application to specified location.

My user provides key using my installer and I want to apply the key into my xml config file.

nsisXML::create ;create instance

nsisXML::load "web.config" ; load file

nsisXML::select '/configuration/appSettings/add[@key="version"]' ; configuration path

  IntCmp $2 0 notFound ;if comparison fails go to notfound block

nsisXML::setAttribute "value" "1.0.0" ;  update value

nsisXML::save "web.config" ; save into file


Plugin I have used to do this


that gives you all you should need

Related posts

Currenlty there are no related articles.