cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
_shielder_
Level 6

When is Uninstall really Uninstall?

InstallShield MSI

I have a SQL Script that deletes my application database from SQL when my app is uninstalled. When doing a Major Upgrade the help states that "the installation typically uninstalls the earlier version from the target machine."

I do not want my Delete Database SQL Script to execute during a Major Upgrade but only if my applications is being removed totally.

Will a Major Upgrade trigger a SQL Script set to "Run Script During Uninstall"?

If so any workarounds?

Thanks
Labels (1)
0 Kudos
(5) Replies
_shielder_
Level 6

Yes, the setting 'Run script during uninstall' will run the script during Major Upgrade also. To make the script not run during the Major Upgrade, use the checkbox for 'Script Condition' at the bottom and specify the condition: REMOVE="ALL" And Not UPGRADINGPRODUCTCODE.

From Tech Support
0 Kudos
Christopher_Pai
Level 16

I would seriously reconsider running a sql script on uninstall. My first reason is you are most likely deleting user data which is not a best practice and two it adds dependencies and fragility to your uninstall.

The only thing worse then a failed install is a failed uninstall...
0 Kudos
_shielder_
Level 6

Thanks Christopher,

Very interesting. So best practices would be to leave a database in place even though there would be no use for it? I thought the user would be more interested in regaining disk space if they chose to stop using the application. What if I left the data but removed the stored procedures?

Does anyone else out there have an opinion on this?

Thanks again...
0 Kudos
Christopher_Pai
Level 16

When you uninstall word, does Microsoft delete all of your .doc, xls, .mdb, .ppt files?

The question is, does the state of the database change after initial installation? If the database is literally nothing more then a bunch of static table data and stored procs/views to access the data and it never, never changes, then fine, go ahead and drop it. But if database changes to include data the user inputted, you should really consider keeping it. They may reinstall the application one day and want to see the data they had inputted.
0 Kudos
_shielder_
Level 6

I see your point. I hadn't thought about the re-install issue.

Thanks again...
0 Kudos