Install Jenkins agent as a service does not work after upgrade

  agent, jenkins, windows

I upgraded our jenkins installation from Version 2.244 to 2.262.
However all slaves / agents were disconnected.

I tried to reconnect them by deleting the old service, using the "Launch agent from browser" of the agent.
If i just start this it all works fine.
However when I try to use the "Install as a service"-Button the service is installed but i get following error on the agent-site:
Connection was broken

I tried to reinstall, restart the server und going back to the old version of jenkins.
In the older version all agents were i didnt try to reinstall the service work. The ones i tried to fix the problem don’t work.

Can someone help me with this issue?


Source: Windows Questions