this is My Xml
betas:
optIn: false
downloads:
altState: false ..>>>>>>>> "How to change This False to true Using Inno Setup"
controlState: false
Please Help me
this is My Xml
betas:
optIn: false
downloads:
altState: false ..>>>>>>>> "How to change This False to true Using Inno Setup"
controlState: false
Please Help me
Do a sed function
// sed(file_to_edit, 'original_text', 'new_text');
function sed(fname: String; Orig: String; Moded: String): Boolean;
var
fhandle: AnsiString;
fhandle_uni: String;
begin;
Result := LoadStringFromFile(WizardDirValue() + '\' + fname, fhandle);
if Result = True then
begin
fhandle_uni := String(fhandle);
StringChangeEx(fhandle_uni, Orig, Moded, True);
Result := SaveStringToFile(WizardDirValue() + '\' + fname, AnsiString(fhandle_uni), False);
end;
end;
WizardDirValue() is the installation dir, this will edit the file after finishing installation.
procedure CurPageChanged(CurPageID: Integer);
begin
if CurpageID = wpFinished then
begin;
sed('file.xml', 'altState: false', 'altState: true')
end;
end;
or
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin;
sed('file.xml', 'altState: false', 'altState: true')
end;
end;
both should work.