On 23/12/2021 16:20, Kauppila Jared wrote:
Hello,
When using 'procrun.exe' to install a service on Windows, you can specify
'-Install C:/path/to/procrun.exe' to set the imagePath that the service will
utilize.
I've noticed that updating a service while passing '-install' will not update
that imagePath and digging into the code verifies this at
https://github.com/apache/commons-daemon/blob/master/src/native/windows/apps/prunsrv/prunsrv.c#L994
That was clearly a deliberate decision. What isn't clear is why the
decision was made.
In my scenario, I would like to upgrade the version of Commons Daemon I'm using
and need to update that imagePath value. Is my only option to delete/install
the service, or manually edit the registry? Or is there some other command to
facilitate updating that value?
I don't believe there is a command to do that.
Is another option just to replace the executable with the new version?
Would a PR be accepted to allow updating imagePath via the update command?
I don't see why not, providing that it was shown that updating the image
path didn't cause any complications. I do wonder how a service would
react if that was changed while the service was running.
Given that you are going to have to stop the service to update
procrun.exe, why not stop the service, replace procrun.exe and restart
the service instead?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org