We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

azzarok
Posts: 2
Joined: Sun Feb 07, 2016 3:04 am

Search for file before starting installation

I want to check if a file exists in APPDIR before installing my program.
My event is the last one in InstallDlg:
https://gyazo.com/194ba35e5bad2e62a4f28da389839275

GTA Search Config:
https://gyazo.com/63db0d4680c90c8cc1a09b1510abf59b
https://gyazo.com/0c35da790fbd8edee40a393616d677c8

AdvancedInstaller dosen't check if the file exists or not in APPDIR, it goes straight for the install anyway. How can I get this to work?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Search for file before starting installation

Hello,
I want to check if a file exists in APPDIR before installing my program.
My event is the last one in InstallDlg
Please note that the property assigned to the search operation (in your case GTA property ) will be set with the full path to the .EXE file (e.g. C:\Program Files (x86)\GTA\GTA5.exe) if the file can be found on the target machine, otherwise the property will be empty.
AdvancedInstaller dosen't check if the file exists or not in APPDIR, it goes straight for the install anyway. How can I get this to work?
Note that the APPDIR is set after the AppSearch standard action. The search operations defined in the Search view are performed by the AppSearch standard action. This is why you cannot use APPDIR as specific search folder location.

However, you can try to search for the .EXE file either on all fixed drivers (if you don't know a specific folder e.g. [ProgramFilesFolder]) and increase the deep in the directory structure where the search should go.

By the way, have you checked to see if there is any registry entry that contains the install path of GTA?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”