Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #361  
Old 10-12-2019, 12:22
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 306
Thanks: 383
Thanked 578 Times in 178 Posts
Cesar82 is on a distinguished road
Inno Setup Repack 6.03

I upgraded my Inno Setup Repack to v6.03 (The link contain Lite e Full version).
To install skins packs extract SkinPack.rar from the same Inno Setup Repack FULL installer directory.
Reply With Quote
The Following 4 Users Say Thank You to Cesar82 For This Useful Post:
Fabioddq (10-12-2019), mausschieber (10-12-2019), omdj (10-12-2019), Simorq (10-12-2019)
Sponsored Links
  #362  
Old Yesterday, 10:49
Proxson Proxson is offline
Registered User
 
Join Date: Nov 2017
Location: Croatia
Posts: 19
Thanks: 10
Thanked 6 Times in 4 Posts
Proxson is on a distinguished road
Hi ppl,

is there a constant for Users\Username\Saved Games ? I want to delete a folder in Saved Games but to no avail. I can't find that constant on the net.

I tried:

{Userprofile}\Saved Games
{%Userprofile%}\Saved Games
%Userprofile%\Saved Games
{Username}\Saved Games

Edit: The only way is writing down the full path in Setup.ini which is SaveGameFolder3=C:\Users\*****\Saved Games\

Not a very happy solution. I can't believe that the Inno Setup developer didn't include such constant.

Last edited by Proxson; Yesterday at 12:13.
Reply With Quote
  #363  
Old Yesterday, 14:10
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 306
Thanks: 383
Thanked 578 Times in 178 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Proxson View Post
Hi ppl,

is there a constant for Users\Username\Saved Games ? I want to delete a folder in Saved Games but to no avail. I can't find that constant on the net.

I tried:

{Userprofile}\Saved Games
{%Userprofile%}\Saved Games
%Userprofile%\Saved Games
{Username}\Saved Games

Edit: The only way is writing down the full path in Setup.ini which is SaveGameFolder3=C:\Users\*****\Saved Games\

Not a very happy solution. I can't believe that the Inno Setup developer didn't include such constant.
There is no native constant in Inno Setup for the "Saved Games" folder.
You can use something like this:
Code:
function UpdateConstant(const S: String): String;
var
  strDocs: String;
  strSaves: String;
begin
  Result := ExpandConstantEx(S, 'savedgames', ExpandConstant('{userdocs}\My Games'));
  if (GetWindowsVersion shr 24 >= 6) and (Result = ExpandConstant('{userdocs}\My Games')) then
  begin
    RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{F42EE2D3-909F-4907-8871-4C22FC0BF756}', 'RelativePath', strDocs);
    RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}', 'RelativePath', strSaves);
    StringChangeEx(Result, '\' + strDocs + '\My Games', '\' + strSaves, True);
  end;
end;
This function also expands the other constants normally:
>> MsgBox(UpdateConstant('{userdocs}'), mbInformation, MB_OK); {expands normally}
>> MsgBox(UpdateConstant('{savedgames}'), mbInformation, MB_OK);

Remembering that CIU already has an UpdateConstant function.
If it is to be used in the CIU script, change the function name such as UpdateConstant2.

Last edited by Cesar82; Yesterday at 16:16.
Reply With Quote
The Following 2 Users Say Thank You to Cesar82 For This Useful Post:
Proxson (Yesterday), Simorq (Yesterday)
  #364  
Old Yesterday, 17:26
Proxson Proxson is offline
Registered User
 
Join Date: Nov 2017
Location: Croatia
Posts: 19
Thanks: 10
Thanked 6 Times in 4 Posts
Proxson is on a distinguished road
Thanks, but where should I "squeeze" these lines in the script coz the compiler gives me an error... UpdateConstant is duplicate.

Last edited by Proxson; Yesterday at 17:28.
Reply With Quote
  #365  
Old Yesterday, 18:00
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 306
Thanks: 383
Thanked 578 Times in 178 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Proxson View Post
Thanks, but where should I "squeeze" these lines in the script coz the compiler gives me an error... UpdateConstant is duplicate.
Change the name of the function and call the function using the new name.
Where do you want to use this constant savegames?
In which part of the script?
Reply With Quote
  #366  
Old Yesterday, 18:34
Proxson Proxson is offline
Registered User
 
Join Date: Nov 2017
Location: Croatia
Posts: 19
Thanks: 10
Thanked 6 Times in 4 Posts
Proxson is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
In which part of the script?
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

Last edited by Proxson; Yesterday at 21:38.
Reply With Quote
  #367  
Old Today, 02:32
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 306
Thanks: 383
Thanked 578 Times in 178 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; Today at 02:53.
Reply With Quote
The Following 3 Users Say Thank You to Cesar82 For This Useful Post:
mausschieber (Today), Proxson (Today), Simorq (Today)
  #368  
Old Today, 08:21
Proxson Proxson is offline
Registered User
 
Join Date: Nov 2017
Location: Croatia
Posts: 19
Thanks: 10
Thanked 6 Times in 4 Posts
Proxson is on a distinguished road
Great ! That makes things easier. Thanks !

Btw, regarding registry. Yes, it works but as long as the subkey is empty, the uninstaller will delete it. But if it's not empty, it will remain.
Where is the switch in the script to make registry entries uninstall whether they're empty or not ?
Thanks mate for your work !

Last edited by Proxson; Today at 08:28.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[CIUv2] Custom Installer Ultimate v2 Project Source Codes KaktoR Conversion Tutorials 606 26-12-2018 08:28
[Wiki] Custom Installer Ultimate v2 KaktoR Conversion Tutorials 34 17-10-2018 09:41
[GSERIES] Custom Installer Ultimate V2g Gupta Conversion Tutorials 226 01-06-2018 14:12
Crysis 3 DVD9 to 3xDVD5 Custom Installer spawniectes PC Games - CD/DVD Conversions 79 31-08-2017 08:19
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 7 01-10-2016 17:28



All times are GMT -7. The time now is 19:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2000-2018, FileForums @ https://fileforums.com