Check if file exists and conditionally perform an action

Started by overlynifty, April 22, 2010, 05:14:34 AM

Previous topic - Next topic

overlynifty

I found them. Thanks! I will check them out and see if I can get it to work.

Randem

Inno Setup documentation has code examples and explainations and examples were installed with Inno Setup in the examples folder where you installed Inno Setup.

overlynifty

Where can I find some good documentation/examples on how to do this?

Randem

You would have to write code in the code section [Code] to accomplish that task. The have your script call the code section. You could write the code in a template to have InnoScript add it to your script.

overlynifty

ok. That makes sense. I will give it a try.
 
I have another related question now. Here's the situation: Innoscript creates an output file called setup.exe. I want the setup program to check if a file exists in it's same directory and if it does then copy it from that directory to the directory where the user chooses to install the application.  
 
more specifically ... I have a license file that I include on my CDs. The license file sits in the same directory as the installation setup.exe program I currently use. The installation program checks to see if the license file exists and if it does, then copies it to the directory where the user is installing my application.
 
How would I get innoscript to do that?

Randem

Basically you add the database with in the Add Files tab then set the flags not to overwrite.
 
Hopefully you are not using your database in the Program Files folder. Ref: Installer Problems

overlynifty

I would like my install to detect if the applications database file already exists on the users machine, and if it does, to not install a new database. I want to prevent the existing database from being overwritten. How do I do that with innoscript?