Skip to content
⌘ NSIS Forum Archive

Check if file exists compile time

5 posts

toroso#

Check if file exists compile time

Hi,

Is it possible to check if a file exists at compile time with NSIS?

I would like to like this functionality to make branding easier: if a file exists then use it, otherwise use a default file.

Thanks!
toroso#
Thanks,

Do you have any reference to a document describing how to make such an application, how to set a define from it and how to call upon it?

One solution I see is to call upon it is with !system and to use the return value from it. Another way would be to make a plug-in DLL, but as I understand it these are distributed with the package and used at runtime (am I right?).
Joost Verburg#
If you just want to include files use the /nonfatal options for File.

Otherwise I recommend you to execute an application using !system and let it write a header file you can include.