I want to delete the old database before installing the new one in order to update it for the user.
I have the following script:
In my section Components, I have an option for the user:
[Components]
Name: "updateDatabase"; Description: "Update Database"; Types: custom; \
Flags: checkablealone disablenouninstallwarning
And I have a Codeprocedure in the section for execution, if the user selects this parameter in the execution section, before installing a new one.
[Code]
procedure RemoveOldDatabase();
begin
...
end;
[Run]
**--> Here I want to call RemoveOldDatabase if Components: updateDatabase is checked**
Filename: "database.exe"; StatusMsg: "Installing new database..."; Components: updateDatabase
Installing a new database is fine. The problem is that I want to remove the old one before installing the new one by calling the procedure RemoveOldDatabase.
Can I use only Inno Setup?
Thank.
source
share