View forum topic
List of forum topicsSubject: Setup Executable Run Condition
I need to run Setup Executable only if it is in a specific folder.
If installed application path is c:\program files\myApp, the Setup Exectable would runs if it stay in that folder or subfolder.
Exists a way to set this in project setup?
I didn't understand you well.
Do you want that the user copy your setup file into that folder and run it there?
or
Do you want that the user can install your application only in that folder?
or
Do you want that the user can install your application anywhere but the application runs only if the installation path c:\program files\myApp.
Setup runs only if it is lanched from c:\program files\myApp.
In Dialog - Progress If Condition I put:
macrox_get("exepath") == macrox_get("progfiles") + "\\myApp"
and others triks to dispay a custom dialog to say to user that setup must be lauched from c:\program files\myApp
In this way Setup runs but without copy files due to "If Condition".
Is there another/better way to do it?
For example
Insert If Statement command at the beginning of your Script.
Variable: exepath
Comparison: Not equal (ignore case)
Value: #progfiles#\myApp
Then insert "Message" command with a warning text into this command and then insert Exit/Reboot command to exit the installation process.
I did it and it works as i expect.
Thanks
January 16, 2025 Installer CreateInstall 8.11.1 was released.
June 19, 2024 Installer CreateInstall 8.11.0 was released. read more
November 13, 2022 Installer CreateInstall 8.10.1 was released.
May 21, 2022 Installer CreateInstall 8.10.0 was released.
September 25, 2021 Installer CreateInstall 8.9.0 was released.
July 15, 2021 Installer CreateInstall 8.8.1 was released.