public override Result Execute(IOfferRemoteOperations remote, ServerConfig server, ConDepSettings settings, CancellationToken token) { token.ThrowIfCancellationRequested(); Logger.WithLogSection("Pre-Operations", () => { server.GetServerInfo().TempFolderDos = string.Format(TMP_FOLDER, "%windir%"); Logger.Info(string.Format("Dos temp folder is {0}", server.GetServerInfo().TempFolderDos)); server.GetServerInfo().TempFolderPowerShell = string.Format(TMP_FOLDER, "$env:windir"); Logger.Info(string.Format("PowerShell temp folder is {0}", server.GetServerInfo().TempFolderPowerShell)); PublishConDepNode(server, settings); var scriptPublisher = new PowerShellScriptPublisher(settings, server); Logger.WithLogSection("Copying external scripts", () => scriptPublisher.PublishScripts()); Logger.WithLogSection("Copying remote helper assembly", () => scriptPublisher.PublishRemoteHelperAssembly()); InstallChocolatey(server, settings); }); return(Result.SuccessUnChanged()); }
public override Result Execute(IOfferRemoteOperations remote, ServerConfig server, ConDepSettings settings, CancellationToken token) { token.ThrowIfCancellationRequested(); Logger.WithLogSection("Pre-Operations", () => { server.GetServerInfo().TempFolderDos = string.Format(TMP_FOLDER, "%windir%"); Logger.Info(string.Format("Dos temp folder is {0}", server.GetServerInfo().TempFolderDos)); server.GetServerInfo().TempFolderPowerShell = string.Format(TMP_FOLDER, "$env:windir"); Logger.Info(string.Format("PowerShell temp folder is {0}", server.GetServerInfo().TempFolderPowerShell)); PublishConDepNode(server, settings); var scriptPublisher = new PowerShellScriptPublisher(settings, server); Logger.WithLogSection("Copying external scripts", () => scriptPublisher.PublishScripts()); Logger.WithLogSection("Copying remote helper assembly", () => scriptPublisher.PublishRemoteHelperAssembly()); InstallChocolatey(server, settings); }); return Result.SuccessUnChanged(); }