Suppressing service installation
Posted 26 August 2004 - 17:10
For testing purposes I even tried to change the CA to remove _all_ the records:
Set oView = Database.OpenView( "delete from ServiceInstall" )
but InstallServices doesn't seem to pay attention: it still installs all the services initially listed in the table.
I also tried to turn the custom action into deferred (type 1024+38) but then it fails with 1720.
Posted 01 September 2004 - 04:16
Posted 01 September 2004 - 06:46
There is no doubt it's possible to modify the tables. E.g. I successfully do it in the UI sequence. Of course, the changes are not persistent.
Posted 01 September 2004 - 07:21
Try movning the service back to the beginning of the InstallExecuteSequence and see if that works. If no, then I am a bit stumped, but if it does work, then keep moving it up the sequence until it stops working.
You might need to run it before InstallInitialize, but im not %100 sure on that...
Posted 01 September 2004 - 09:51
As you know the windows installer transaction runs between InstallInitialize and InstallFinalize, and anything added here will be "run twice" in a way (not always run twice, but evaluated twice). First the actions are read while the installation script is being written (immediate mode), then when MSI hits InstallFinalize it starts running the installation script actions (deferred mode) starting at InstallInitialize. Once you get into deferred mode the database is read only for sure, and it is quite possible that the InstallFinalize action will roll back any temporary records added to your installation database in immediate mode (but this I am not sure of).
In conclusion: I think you need to either register this service using Installscript or a VBscript so you have more power to control and check the current state, or redesign the installation in some other fashion.
Posted 02 September 2004 - 08:26
My experience learnt to be very careful about one thing: when the install is run again (eg. repair, uninstall, ...) make sure you modify the tables exactly like the last time setup was run.