Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Need some help stopping an Application


2 replies to this topic

jstatham

jstatham
  • Full Members
  • 2 posts

Posted 23 January 2007 - 22:45

I hope someone can please help me. I have been beating my head against a wall for a week. Here is the scenerio. We use Firebird as our database engine. We need to make some changes to the config file as well as add in the UDF dll. All that is easy the problem I am having to stop and start Firebird. Firebird runs as a service on NT or greater and as an application on 9X. If I use an installshield component to start and stop a service it works fine and everything is great. The problem comes in when I create some custom actions that call a custom dll that check if the application is running and if it is I kill it. I have this customer action run on all operating systems because a few of our xp guys run it as an app. Ok Now here is the issue. I run the install and installshield will shut down firebird when running as a service. It then calls the custom action to check and make sure it is actually stopped and if not it will kill the process this function is designed for the 9x users but I still have it check on NT and greater for the few NT users that may be running it as an app. After this Installshield will start up the service on NT and I have another custom action that starts firebird as an app on 9x only. Once all this takes place another customer action runs that runs a db update. There is a function in the dbupdate call isapplication running. This function querys the system and look for the process fbserver.exe running. Here is the actual problem eventhough it is running this function returns false when ran through installshield. If this function cannot detect it running it exits and the db update never gets ran. After a week of trial an error it seems to me that when the msi calls and external function it messes up the process and windows does not detect the application is running even though it is. If I setup the msi for nt only and do not call the custom actions to start and stop everything runs through fine. Has anyone ran across this or do you know of a better way to start and stop and application and windows will still detect it? I am not sure who's bug or error I am fighting. Any help will be greatly appericated.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 January 2007 - 15:25

Remeber that parts of your msi install run in the local system account while others run in the current user's account. This might be causing the problem, if the database is running in a different account or the custom action doesn't have the rights to terminate the process.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 January 2007 - 15:43

I'd definitely check a way to "get all processes for all users". It probably has to do with the context you run in. I am slightly confused if the problem occurs or not on Win9x? MSI will run in the user context all the way through in Win9x - this would normally make the code you use work (if it is indeed a user context problem).
Regards
-Stein Åsmul