Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

OnRebooted and services

InstallScript MSI project, Windows 2003 Server.
I am trying to move some configuration processes to the OnRebooted event because of some problems with Major Upgrades (launching the configuration utility in FirstUIAfter during a Major Upgrade triggers a 'self-repair' of the old version, resulting in a number of merge modules files being installed in incorrect locations and left behind during a subsequent uninstall).

My configuration process needs to start a service (Adaptive Server Anywhere db engine) that was set up during the install, then call a utility to run SQL to modify the DB. This works fine in the FirstUIAfter event but triggers the unwanted self-repair - but fails when I try to run it in the OnRebooted event. For starters the ServiceExistsService function returns False even though the service exists. I've looked hard for typos and have put in message boxes for debug traces - I can't see any reason for it to fail.

Does the resumed setup and the OnRebooted event somehow not have the same privileges or something? I am logging in as the same administrative-level user after the reboot as I used when running the initial setup.

Could use all the help I can get - thanks.

Labels (1)
0 Kudos
1 Reply
Level 5

The root of my problem seems to involve including and ODBC DSN. I found that trying to include the actual Sybase ODBC driver in my setup (a choice the IDE made for me by default) and not just the DSN that referenced it was causing really strange behavior during a Major Upgrade. Log files showed that the property SystemFolder was being changed during the SetODBCFolders action - that was what was causing my original problem that I was trying to work around. When I dropped the ASA Driver from the project and included just the DSN, I cleared up not only that issue, but found that my problem with launching the service also went away.
For this particular install, not including the actual driver isn't a problem. I know it is getting installed as part of the ASA engine setup that I shell out to.
0 Kudos