View Single Post
  #2  
Old 12-12-2019, 01:32
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Proxson View Post
Man, you're confusing me. I'm not a inno-script pro !

Well, during the uninstalling process. I want a folder, created by the game, vanish from Saved Games folder. Btw, I'm using Win7 and the path is:

C:\Users\My Name\Saved Games\Metro Exodus

Sorry I know, I'm a pain in da ass. I suffer from perfectionism OCD, btw. It's nasty

Edit: I sorted it out in Setup.ini --> SaveGameFolder3=C:\Users\{username}\Saved Games\Metro Exodus ...aaaand the folder is gonsky ! I'm happy with it. Well, the only problem is
where Metro Exodus dumps this save game folder in Win10.

@Cesar m8, your priority is to fix the registry issue !

Btw, Metro Exodus creats 3 folders and 2 registry entries during the first launch:

1. My Documents --> 4A Games
2. Users\Username\Appdata\Roaming --> CPY_Saves (ermmm...cough)
3. Users\Username\Saved Games --> Metro Exodus

Registry:

1. HKEY_CURRENT_USER\Software\4A-Games
2. HKEY_USERS\S-1-5-21-1998757662-2675839664-690416582-1000\Software\4A-Games
The registry entries for work well for me.

To remove the save folder inside the Saved Games folder using the key SaveGameFolder#= use {sd} to set a system drive:
SaveGameFolder3={sd}\Users\{username}\Saved Games\Metro Exodus

I will include a constant {savedgames} in the next CIU update.
If you want to change it in the current CIU script the text in red color.
Code:
function GetSavedGameFolder: String;
begin
  Result := ExpandConstant('{userdocs}\My Games');
  RegQueryStringValue(HKEY_CURRENT_USER, 'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', '{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}', Result);
end;

function UpdateConstant(Current: String) : String;
begin
  Result := Current;
  if UninstallMode then
    StringChangeEx(Result, '{app}', UninstallPath, True)
  else
    StringChangeEx(Result, '{app}', WizardForm.DirEdit.Text, True);
  StringChangeEx(Result, '{savedgames}', GetSavedGameFolder, True);
  StringChangeEx(Result, '{win}', ExpandConstant('{win}'), True);
  StringChangeEx(Result, '{sys}', ExpandConstant('{sys}'), True);
  ...///The code goes on...
After code changed, use SaveGameFolder3={savedgames}\Metro Exodus

Last edited by Cesar82; 12-12-2019 at 01:53.
Reply With Quote
The Following 3 Users Say Thank You to Cesar82 For This Useful Post:
mausschieber (12-12-2019), Proxson (12-12-2019), Simorq (12-12-2019)