Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9165813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:59:40+00:00 2026-06-17T14:59:40+00:00

I want the installer to edit a xml file in silence, without promp messages,

  • 0

I want the installer to edit a xml file in silence, without promp messages, that if the xml file exist in destination location, the installer edit it, and if do not exist in destination location, the installation continue and ignore that the xml file do not exist without prompt message. I saw the CodeAutomation.iss but that do not help me. Please help with a code sample.

[Files]
Source: GameConfiguration.xml; DestDir: "{pf}\Game\Sala"; Flags: uninsneveruninstall;

procedure SaveValueToXML(const AFileName, APath, AValue: string);
var
  XMLNode: Variant;
  XMLDocument: Variant;  
begin
  XMLDocument := CreateOleObject('Msxml2.DOMDocument.6.0');
  try
    XMLDocument.async := False;
    XMLDocument.load(AFileName);
    if (XMLDocument.parseError.errorCode <> 0) then
      MsgBox('Install Garena. ' +
        XMLDocument.parseError.reason, mbError, MB_OK)
    else
    begin
      XMLDocument.setProperty('SelectionLanguage', 'XPath');
      XMLNode := XMLDocument.selectSingleNode(APath);
      XMLNode.text := AValue;
      XMLDocument.save(AFileName);
    end;
  except
    MsgBox('Install Garena', mbError, MB_OK);
  end;
end;

  function NextButtonClick2(PageID: Integer): Boolean;
 begin
    Result := True;
    if (PageId = wpFinished) then begin
        SaveValueToXML(ExpandConstant('{pf}\Game\Sala\GameConfiguration.xml'), '//@param', PEdit.Text);
        SaveValueToXML(ExpandConstant('{pf}\Game\Sala\GameConfiguration.xml'), '//@path', ExpandConstant('{reg:HKCU\SOFTWARE\xxx,InstallPath}\xxx.exe'));
    end;
 end;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:59:42+00:00Added an answer on June 17, 2026 at 2:59 pm

    Just test for the existence of the XML file first:

    function NextButtonClick2(PageID: Integer): Boolean;
    var
      XMLFile: string;
    begin
      Result := True;
      if (PageId = wpFinished) then 
      begin
        XMLFile := ExpandConstant('{pf}\Game\Sala\GameConfiguration.xml');
        if FileExists(XMLFile) then 
        begin
          SaveValueToXML(XMLFile, '//@param', PEdit.Text);
          SaveValueToXML(XMLFile, '//@path', 
            ExpandConstant('{reg:HKCU\SOFTWARE\XXX,InstallPath}\xxx.exe'));
        end;
      end;
    end;
    

    end;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an installer that needs to edit an INI file during the
I have a windows installer (MSI) project. I want to ensure that when i
I'm working on an installer project that consists of an MSI file and a
I have a NSIS installer I want to be totally silent unless it needs
I want to create an installer EXE with some specific properties: it should be
I want to deploy a installer package to my customers. My application is basically
I want to make a mock installer using NSIS so we can demo what
I have an installer and i want to add Sap Crystal Report to this
I want to show some web page INSIDE Inno Setup installer page, how can
I want to include VC 8.0 runtime redistributable packages into my app installer. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.