|
#11
|
||||
|
||||
|
Quote:
It doesn't memorize your last choice, it always installs in a "Games" folder and on the same drive. Even if you choose "E:\My Games", assuming the system is installed on the "C:" drive in the next install it will suggest "D:\Games" as in the first install (Correct me if I'm wrong). If you want similar behavior change the line in the [Setup] section of the script. Code:
from:
DefaultDirName={#DefaultDir}\{#GameName}
to:
DefaultDirName={code:NoSD}\Games\{#GameName}
Code:
const DRIVE_FIXED = 3; function GetLogicalDriveStrings(nLenDrives: DWORD; lpDrives: String): DWORD; external '[email protected] stdcall delayload'; function GetDriveType(lpDisk: String): DWORD; external '[email protected] stdcall delayload'; function NoSD(Param: String): String; var Drive: String; Buffer: String; begin SetLength(Buffer, 255); SetLength(Buffer, GetLogicalDriveStrings(254, Buffer)); Result := ExpandConstant('{sd}'); while Pos(#0, Buffer) > 0 do begin Drive := Copy(Buffer, 1, Pos(#0, Buffer) - 1); if (GetDriveType(Drive) = DRIVE_FIXED) and (CompareText(Drive, ExpandConstant('{sd}\')) <> 0) then begin Result := RemoveBackslash(Drive); Break; end; Delete(Buffer, 1, Pos(#0, Buffer)); end; end; Last edited by Cesar82; 02-11-2021 at 09:25. |
| The Following 2 Users Say Thank You to Cesar82 For This Useful Post: | ||
Gehrman (03-11-2021), giruthanders (05-11-2021) | ||
| Tags |
| asis, ciu, inno, installer, ultraarc |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Help] need Advanced Installer script with Razor1911's UltraArc module | rez3vil | Conversion Tutorials | 3 | 15-04-2024 02:24 |
| Ultimate Conversion Compressor (UCC) | vollachr | Conversion Tutorials | 55 | 26-04-2021 09:27 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| How many forum members does it take to change a light bulb? | rms2001 | XBox Games | 6 | 12-01-2004 05:31 |