Ticket #71 (assigned defect)

Opened 9 years ago

Last modified 8 years ago

Windows installer does not stop POPFile Service (popfile-service.exe)

Reported by: amatubu Assigned to: brian (accepted)
Priority: low Milestone:
Component: Installer Version: 1.0.1
Severity: normal Keywords:
Cc:

Description

The Windows installer does not stop the POPFile Service (popfile-service.exe).

This causes 'popfile-service.exe is locked' error. I have to manually stop the service and start after the installation.

I start/stop the service using the command 'net start POPFile'/'net stop POPFile'.

Change History

07/06/08 16:14:21 changed by brian

  • status changed from new to assigned.

The installer is supposed to detect that the POPFile service is running and then ask the user to stop the service.

The installer does not try to start or stop the service. In fact it does almost nothing apart from trying to detect whether or not the service is running and copying the executable file to the installation folder. These design decisions were passed on to me when the Windows service program was added to the installer.

When I wrote the code to detect the POPFile service I could not test it on my Win98SE system so I had to rely upon someone else testing it for me. As far as I know, the code used to work but I have to admit that I have never tried using the service on my "new" Vista PC until today.

It took me a while to work out how to start the service (Vista's Help was not much help here) but eventually I managed to get the Abort-Retry-Ignore message when the 1.1.0 RC0 installer tried to overwrite the popfile-service.exe file.

Unfortunately the installer log containing the relevant entries is not visible so I am not sure what is going wrong. However I think it will be possible to move the code used to detect whether or not the POPFile service is running and therefore make the log entries visible so that I can see what is going wrong.

Brian

07/06/08 17:37:58 changed by brian

The problem is that, on Vista at least, the code that detects whether or not the POPFile service is running always returns "false" when run from a "standard user" account. When run from an administrator account it returns "true" when the service is running and "false" if it is stopped.

I think the quickest workaround is to check if popfile-service.exe is locked before trying to overwrite the file and if necessary display a message asking the user to shutdown POPFile. This will be better than the alarming "Abort-Retry-Ignore" message.

(Although the current code will return "true" when the service is running and an administrator account is used, it will return "false" if the service is paused in which case the file will still be locked. Looks like more work needs to be done here!)

Brian

07/11/08 13:17:18 changed by brian

I think the quickest workaround is to check if popfile-service.exe is locked before trying to overwrite the file and if necessary display a message asking the user to shutdown POPFile.

Initial attempts at implementing this have shown that the LockedList? plugin is unable to detect that the popfile-service.exe file is locked when the plugin is used from a standard account on Vista (it works OK from an administrator account). The alternative "append" type of test to determine whether or not the file is locked won't work either when it is used from a standard account.

Need to rethink how the installer handles the two installer instances (administrator and standard user).

Brian

07/26/08 17:33:36 changed by brian

Initial attempts at implementing this have shown that the LockedList?? plugin is unable to detect that the popfile-service.exe file is locked when the plugin is used from a standard account on Vista (it works OK from an administrator account). The alternative "append" type of test to determine whether or not the file is locked won't work either when it is used from a standard account.

Replacing the calls to advapi32::OpenSCManagerA, advapi32::OpenServiceA, advapi32::QueryServiceStatus? and advapi32::CloseServiceHandle? with calls to the SimpleSC plugin results in much more reliable detection of when the POPFile service is running or paused.

The 1.1.0 RC1 installer uses the SimpleSC plugin and this should ensure that the Abort/Retry/Ignore message is no longer seen. If the POPFile service is running or paused then the installer should now display a message asking the user to shut down POPFile.

Brian