|
#11
|
||||
|
||||
|
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. |
|
|
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 |