View Single Post
  #5  
Old 24-07-2017, 02:57
seventhorama seventhorama is offline
Registered User
 
Join Date: Jul 2011
Location: outer space
Posts: 30
Thanks: 0
Thanked 1 Time in 1 Post
seventhorama is on a distinguished road
i need some help in modifying xml using innosetup

Code:
<?xml version="1.0"?>
<Settings>
  <Setting type="10" key="DownloadInPlaceDir" value="D:\Games\My Games"/>
  <Setting type="10" key="LastUsernameToLoginProd" value="fb2076434038419fa915a7c07bc4768f2b847bd600b9482d440f1ced341a48c64654c4fdec3f57a7b1b35d4913675d33d8c7793691b0ff84caaf6815ee873f91964e2fe64cbf4683"/>
  <Setting type="10" key="RememberMeProd" value="1b07700a38e33470"/>
  <Setting type="10" key="RememberMeUserIdProd" value="1b07700a38e33470"/>
  <Setting type="10" key="TFAIdProd" value="1b07700a38e33470"/>
</Settings>
can i modify D:\Games\My Games into parent dir (not app dir)?

i have tried this script but no luck yet...

Code:
procedure CurStepChanged(CurStep: TSetupStep);
var
  UnicodeStr: string;
  ANSIStr: AnsiString;
begin
  if (CurStep = ssPostInstall) then
  begin
  LoadStringFromFile(ExpandConstant('{src}\apps.xml'), ANSIStr)
  UnicodeStr := String(ANSIStr);
  StringChangeEx(UnicodeStr, 'DownloadInPlaceDir', ExpandConstant('{src}'), False)
  SaveStringToFile(ExpandConstant('{src}\apps.xml'), AnsiString(UnicodeStr), False);
  end;
end;
Reply With Quote