From 6ed959b23408b2179f6079141b838241df5f4372 Mon Sep 17 00:00:00 2001 From: AgentTechnoman <46273498+AgentTechnoman@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:19:22 -0700 Subject: [PATCH] Simplify Windows install command Simplified the installation script; though it assumes that PowerShell was launched as Administrator. --- Server/Components/Pages/Deploy.razor | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Server/Components/Pages/Deploy.razor b/Server/Components/Pages/Deploy.razor index 4971bf410..503199e24 100644 --- a/Server/Components/Pages/Deploy.razor +++ b/Server/Components/Pages/Deploy.razor @@ -283,8 +283,7 @@ private void SetScriptContent() { _windowsScript = - $"Invoke-WebRequest -Uri '{NavMan.BaseUri}api/ClientDownloads/WindowsInstaller/{_organizationId}' -OutFile \"${{env:TEMP}}\\Install-Remotely.ps1\" -UseBasicParsing;" + - "Start-Process -FilePath 'powershell.exe' -ArgumentList (\"-executionpolicy\", \"bypass\", \"-f\", \"${env:TEMP}\\Install-Remotely.ps1\") -Verb RunAs;"; + $"irm '{NavMan.BaseUri}api/ClientDownloads/WindowsInstaller/{_organizationId}'|iex"; _ubuntuScript = GetLinuxScript("UbuntuInstaller-x64"); @@ -334,4 +333,4 @@ } } -} \ No newline at end of file +}