I'm making a installer for a GTA modification. When the user executes the .exe the first thing it does before showing any GUI is searching for where GTA-SA.exe is located.
I've written common install locations:
# Most common directories where GTA SA can be found
# Default installation directory from GTA SA setup
!define DEFAULT_DIR "$PROGRAMFILES\Rockstar Games\GTA San Andreas\"
# Default installation directory from Steam version
!define STEAM_DIR "$PROGRAMFILES\Steam\steamapps\common\Grand Theft Auto San Andreas"
!define OTHER_DIR_STEAM "D:\SteamLibrary\steamapps\common\Grand Theft Auto San Andrea"
# MixMods recommend users to install their GTA SA folder into Documents
!define MIXMODS_DIR "$DOCUMENTS"
And this is my Locate function inside .onInit code:
# Makes a search into the most common GTA installation folders to
# check where the GTA_SA.exe (or gta-sa.exe) is located
${locate::Open} "${STEAM_DIR}|${MIXMODS_DIR}|C:\|$PROGRAMFILES|${OTHER_DIR_STEAM}|D:\" `\
/F=1 \
/D=0 \
/M=gta?sa.exe \
/A=-HIDDEN|-SYSTEM \
/-PN=Temp|WINDOWS` $0
Can searching through C:\ drive cause issues to the user (Specially in slow HDDs)? If so, what would be the best practice to make this search?