If you are willing to obtain installer's current path, you have to use #SourceDir# macro. This will work perfectly during installation process. Then, for uninstallation you have to use #InstallDir# as previously said.
Now, if you are willing to locate the installation directory of one software from another, system registry or an properly localized INI file need to be use. But first, ensure that #SourceDir# macro is not enough for what you need.
No, I want to find some *.exe file in my computer (in this case it's gta_sa.exe) and I want to find path to it and put in as default to my installation path. I don't want to have fixed path in my installer, is it possible?
Looking on Google, it seems that GTA has some keys in registry. Check inside HKEY_LOCAL_MACHINE\Software and/or HKEY_CURRENT_USER\Software
When the right key will be found, it will be easy to tell ICP to use it as default installation path (just give the right parameters in Options tab).
I've got this, and it worked for different installer with programming language:
Maybe that helps? PleaseCode:InstallDir "$PROGRAMFILES\Rockstar Games\GTA San Andreas\" InstallDirRegKey HKLM "Software\Rockstar Games\GTA San Andreas\Installation" "ExePath"
In the Options tab:
Root key = HKEY_LOCAL_MACHINE
Key = Software\Rockstar Games\GTA San Andreas\Installation
Works great, thanks.. well, but to avoid any further posts like that one, how do I check other installation paths? Let's say I want to find my Install Creator Pro *.exe file path, or DAEMON Tools Lite, then I have to know which Root key to pick? That's my guess, because the rest I have to change like:
Root key = "The one I'll have to find"
Key = Software\Install Creator Pro\Installation
Am I right? Anyway, thanks a lot for help guys.
That depends on the program... Different software = different registry key. You have to ask the guys who create the software for which you want to make an addon (assuming you want to do that), or search in the registry with regedit.