|
|
|
#1
|
||||
|
||||
|
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. |
| The Following 4 Users Say Thank You to Cesar82 For This Useful Post: | ||
| Sponsored Links |
|
#2
|
||||
|
||||
|
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; 11-12-2019 at 11:13. |
| The Following User Says Thank You to Proxson For This Useful Post: | ||
Behnam2018 (30-01-2020) | ||
|
#3
|
||||
|
||||
|
Quote:
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;
>> 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; 11-12-2019 at 15:16. |
|
#4
|
||||
|
||||
|
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; 11-12-2019 at 16:28. |
|
#5
|
||||
|
||||
|
Quote:
Where do you want to use this constant savegames? In which part of the script? |
|
#6
|
||||
|
||||
|
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; 11-12-2019 at 20:38. |
|
#7
|
||||
|
||||
|
Quote:
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...
Last edited by Cesar82; 12-12-2019 at 01:53. |
| The Following 3 Users Say Thank You to Cesar82 For This Useful Post: | ||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| [GSERIES] Custom Installer Ultimate V2g | Gupta | Conversion Tutorials | 226 | 01-06-2018 13:12 |
| Crysis 3 DVD9 to 3xDVD5 Custom Installer | spawniectes | PC Games - CD/DVD Conversions | 79 | 31-08-2017 07:19 |