Skip to content

Issues when trying to run .bat file as Hook Command on Windows Server 2016 #665

Answered by agb2008
agb2008 asked this question in Q&A
Discussion options

You must be logged in to vote

Issue was a bit urgent - so I had to find solution for it ASAP. As a result following workaround could be used to resole it, but it would require rebuilding of Backrest on Windows (after replacing "powershell" by "pwsh" in "if runtime.GOOS == "windows" {" section, file command.go, located in internal\hook\types subfolder) and installing PowerShell 7.5 from https://github.com/PowerShell/PowerShell/releases and adding path to it's location to $PATH Windows environment variable.

Then backrest.exe was replaced by new updated version and restarted. This trick allowed to solve issues with Hook Command submodule on Windows Server 2016 (tested on a number of servers). It would be nice if option a…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@garethgeorge
Comment options

Answer selected by agb2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants