Hi Simon,
A solution could be to condition SQL scripts (which contains dropping database script from an instance of SQL Server) execution at uninstall.
This condition can consist of a public property which is associated with an UI control( e.g. CheckBox ). In this way the scripts will be executed only if the condition is true( e.g. CheckBox is enabled by the user ).
You can set the condition on
sql script properties from
SQL Script page on Script Execution section. Also, you must check only the option "at uninstall" from "Run SQL Script".
Please note, dropping a database deletes the database from an instance of SQL Server and deletes the physical disk files used by the database.
if you don't use the first solution you can use another one:
file removal feature.
You can specify a condition for the removal operation for each database files. You can read
"How do I remove a file or a folder during installation?" to understand how you can use file removal feature.
Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/