This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Can this be right !
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 28, 2012
09:49 AM
Can this be right !
I have an Installscript MSI project.
During the uninstall it appears that it calls through 'OnRMFilesInUse'
before it executes the SQL scripts I have marked to run on un-install.
Consequently I still have a dll loaded by SQL Server and so it is listed in the processes it wishes to be stopped.
If I let this go 'as is' it errors in trying to connect to the SQL server and rolls back the uninstall.
I don't expect the users to be smart enough to stop the associated service we run (before running the uninstall), therfore, I wish to try to run the sql scripts earlier in the uninstall sequence.
I can not see a way to do this on the SQL Scripts panel (you either run it at uninstall or you don't).
I tried to call 'SQLRTComponentUninstall', but it is not recognised.
Apparently this functionality is not available to Installscript MSI projects.
N.B. though I also use 'SQLRTInitialize2' in the install and the help just says they are available to Installscript projects in both cases !
So...
Does anyone have any ideas as to how I can invoke my uninstall sql scripts sooner in the uninstallation
Or
How to override the functionality around 'SdRMFilesInUse' to remove the SQL server as a process to be stopped ?
And I thought this should be so easy !
During the uninstall it appears that it calls through 'OnRMFilesInUse'
before it executes the SQL scripts I have marked to run on un-install.
Consequently I still have a dll loaded by SQL Server and so it is listed in the processes it wishes to be stopped.
If I let this go 'as is' it errors in trying to connect to the SQL server and rolls back the uninstall.
I don't expect the users to be smart enough to stop the associated service we run (before running the uninstall), therfore, I wish to try to run the sql scripts earlier in the uninstall sequence.
I can not see a way to do this on the SQL Scripts panel (you either run it at uninstall or you don't).
I tried to call 'SQLRTComponentUninstall', but it is not recognised.
Apparently this functionality is not available to Installscript MSI projects.
N.B. though I also use 'SQLRTInitialize2' in the install and the help just says they are available to Installscript projects in both cases !
So...
Does anyone have any ideas as to how I can invoke my uninstall sql scripts sooner in the uninstallation
Or
How to override the functionality around 'SdRMFilesInUse' to remove the SQL server as a process to be stopped ?
And I thought this should be so easy !
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 01, 2012
03:54 AM
Does anyone know of a way of running sql scripts at a time of their making during an uninstall of an Installscript MSI project ?
Ok, after some playing around I believe I can move the CA 'ISSQLServerUninstall' from it's usual position in the running order, forward to just after 'ISSQLServerRollback'.
This appears to execute my SQL uninstall scripts before the uninstall tries to remove the DLL I have loaded in SQL Server.
During the uninstall scripts I unload the DLL from SQL Server and remove the xp's it has registered. Thus I don't need to stop the SQL Server to remove the dll from the HDD.
Does anyone know what (if any) functionality is carried out in 'ISSQLServerUninstall' by default and whether it is liable to cause problems by moving this CA further forward in the execute sequence ?
Ok, after some playing around I believe I can move the CA 'ISSQLServerUninstall' from it's usual position in the running order, forward to just after 'ISSQLServerRollback'.
This appears to execute my SQL uninstall scripts before the uninstall tries to remove the DLL I have loaded in SQL Server.
During the uninstall scripts I unload the DLL from SQL Server and remove the xp's it has registered. Thus I don't need to stop the SQL Server to remove the dll from the HDD.
Does anyone know what (if any) functionality is carried out in 'ISSQLServerUninstall' by default and whether it is liable to cause problems by moving this CA further forward in the execute sequence ?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)