Jump to content

Update plugin DLL-file from PowerShell


Martin Stevnhoved

Recommended Posts

Hi.

 

I am making an Automation Script that updates a custom plugin-file, that might is always be in use, to a newer version.

If the plugin doesn't already exist everything works fine.

But if it already exist it cannot be overwritten, because the Pulseway Service (and managers, if any are running) is using the file.

My solution is to stop the service, overwrite the file and start the service.

It works very well when executing manually in ISE, but not when executed as an Automation Script from Pulseway.

It looks like the entire script is terminated when the service stops, and the execution doesn't return anything in execution history - not even an error.

 

Could anyone help me with the best practice for updating a plugin dll-file from an Automation Script.

 

Best Regards,

Martin Stevnhoved

Link to comment
Share on other sites

  • Staff

Hi Martin,

Have you tried to update the registry keys and then stop the Pulseway service? In the latest version of the Pulseway agent we have built in auto recovery, therefore if you stop the Pulseway service it will be started after one minute. Therefore if you will set the correct values for the registry keys, then the Pulseway when it starts it will load the correct files for the Plugin.

Please let me know how it goes.

Link to comment
Share on other sites

I don't need to update any registry keys. I need to replace a plugin-file, that is locked by Pulseway.

I can only overwrite the file, if Pulseway is stopped. But if I stop it the Automation task is stopped.

I have tried to remove the plugin from registry, but the lock on the file is still first released when Pulseway is restarted.

Link to comment
Share on other sites

  • Staff

Please try to copy the file with the different name and then update the registry key, so Pulseway will use the new file.

If you will repeat this operation twice, then you will be able to use the file with the same name.

I hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...