Opened 15 years ago

Last modified 14 years ago

#71 assigned defect

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

Reported by: naoki iimura Owned by: Brian Smith
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 (4)

comment:1 by Brian Smith, 15 years ago

Status: newassigned

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

comment:2 by Brian Smith, 15 years ago

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

comment:3 by Brian Smith, 15 years ago

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

comment:4 by Brian Smith, 15 years ago

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

Note: See TracTickets for help on using tickets.