mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Update downloads page to reflect switch to PowerShell installer.
This commit is contained in:
parent
7478d6333e
commit
208a1be970
@ -114,10 +114,10 @@ public class ClientDownloadsController : ControllerBase
|
||||
return await GetInstallFile(orgId, platformID);
|
||||
}
|
||||
|
||||
[HttpGet("{organizationID}/{platformID}")]
|
||||
public async Task<IActionResult> GetInstaller(string organizationID, string platformID)
|
||||
[HttpGet("{platformId}/{organizationId}")]
|
||||
public async Task<IActionResult> GetInstaller(string platformId, string organizationId)
|
||||
{
|
||||
return await GetInstallFile(organizationID, platformID);
|
||||
return await GetInstallFile(organizationId, platformId);
|
||||
}
|
||||
|
||||
private async Task<IActionResult> GetBashInstaller(string fileName, string organizationId)
|
||||
@ -172,16 +172,6 @@ public class ClientDownloadsController : ControllerBase
|
||||
case "WindowsInstaller":
|
||||
{
|
||||
var effectiveScheme = settings.ForceClientHttps ? "https" : Request.Scheme;
|
||||
//var serverUrl = $"{effectiveScheme}://{Request.Host}";
|
||||
//var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Remotely_Installer.exe");
|
||||
//var embeddedData = new EmbeddedServerData(new Uri(serverUrl), organizationId);
|
||||
//var result = await _embeddedDataSearcher.GetAppendedStream(filePath, embeddedData);
|
||||
|
||||
//if (!result.IsSuccess)
|
||||
//{
|
||||
// throw result.Exception ?? new Exception(result.Reason);
|
||||
//}
|
||||
|
||||
|
||||
var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "Install-Remotely.ps1");
|
||||
if (!FileIO.Exists(filePath))
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
|
||||
<div class="row mb-3">
|
||||
<h4>Portable Instant Support Clients</h4>
|
||||
<div class="text-info col-sm-12 ps-0 mb-2">
|
||||
<p class="text-info col-sm-12 mb-2">
|
||||
Instant desktop sharing. No account required.
|
||||
</div>
|
||||
</p>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<strong>Windows (64-Bit)</strong>
|
||||
<p>
|
||||
@ -47,9 +47,9 @@
|
||||
|
||||
<div class="row">
|
||||
<h4>Resident Agents</h4>
|
||||
<div class="text-info col-sm-12 ps-0 mb-2">
|
||||
<p class="text-info col-sm-12 mb-2">
|
||||
Installable background agents that provide unattended access and remote scripting.
|
||||
</div>
|
||||
</p>
|
||||
|
||||
@if (!_isAuthenticated)
|
||||
{
|
||||
@ -63,7 +63,7 @@
|
||||
<div class="col-sm-6 mb-3">
|
||||
<strong>Windows 10 / 11 (64-Bit and 32-Bit)</strong>
|
||||
<p>
|
||||
<a target="_blank" href="/API/ClientDownloads/WindowsInstaller">Windows Installer (x64/x86)</a>
|
||||
<a target="_blank" href="/API/ClientDownloads/WindowsInstaller/@_organizationId">Windows PowerShell Installer</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-Win-x64.zip">Windows x64 Files Only</a>
|
||||
<br />
|
||||
@ -74,7 +74,7 @@
|
||||
<div class="small">Example Quiet Install:</div>
|
||||
|
||||
<code class="label label-default small">
|
||||
Remotely_Installer.exe
|
||||
powershell.exe -ExecutionPolicy Bypass -F {path}\Install-Remotely.ps1
|
||||
-install
|
||||
-quiet
|
||||
-organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6"
|
||||
@ -84,13 +84,13 @@
|
||||
<p>
|
||||
<div class="small">Example Quiet Uninstall:</div>
|
||||
|
||||
<code class="label label-default small">Remotely_Installer.exe -uninstall -quiet</code>
|
||||
<code class="label label-default small">powershell.exe -ExecutionPolicy Bypass -F Install-Remotely.ps1 -uninstall -quiet</code>
|
||||
</p>
|
||||
<p>
|
||||
<div class="small">Example Local Install:</div>
|
||||
|
||||
<code class="label label-default small">
|
||||
Remotely_Installer.exe
|
||||
powershell.exe -ExecutionPolicy Bypass -F {path}\Install-Remotely.ps1
|
||||
-install
|
||||
-quiet
|
||||
-organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6"
|
||||
@ -102,7 +102,8 @@
|
||||
<div class="small">All Override Options:</div>
|
||||
|
||||
<code class="label label-default small">
|
||||
Remotely_Installer.exe -install -quiet -supportshortcut
|
||||
powershell.exe -ExecutionPolicy Bypass -F {path}\Install-Remotely.ps1
|
||||
-install -quiet -supportshortcut
|
||||
-organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6"
|
||||
-serverurl "https://remotely.mytechshop.com"
|
||||
-devicegroup "Customer Group 1"
|
||||
@ -115,9 +116,9 @@
|
||||
<div class="col-sm-6 mb-3">
|
||||
<strong>Linux 64-Bit</strong>
|
||||
<p>
|
||||
<a target="_blank" href="/API/ClientDownloads/UbuntuInstaller-x64">Ubuntu x64 Bash Installer</a>
|
||||
<a target="_blank" href="/API/ClientDownloads/UbuntuInstaller-x64/@_organizationId">Ubuntu x64 Bash Installer</a>
|
||||
<br />
|
||||
<a target="_blank" href="/API/ClientDownloads/ManjaroInstaller-x64">Manjaro x64 Bash Installer</a>
|
||||
<a target="_blank" href="/API/ClientDownloads/ManjaroInstaller-x64/@_organizationId">Manjaro x64 Bash Installer</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-Linux.zip">Linux x64 Files Only</a>
|
||||
</p>
|
||||
@ -141,7 +142,7 @@
|
||||
<div class="col-sm-6 mb-3">
|
||||
<strong>macOS x64 (10.12 - 10.15)</strong>
|
||||
<p>
|
||||
<a target="_blank" href="/API/ClientDownloads/MacOSInstaller-x64">macOS x64 Bash Installer</a>
|
||||
<a target="_blank" href="/API/ClientDownloads/MacOSInstaller-x64/@_organizationId">macOS x64 Bash Installer</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-MacOS-x64.zip">macOS x64 Files Only</a>
|
||||
</p>
|
||||
@ -166,7 +167,7 @@
|
||||
<div class="col-sm-6 mb-3">
|
||||
<strong>macOS arm64</strong>
|
||||
<p>
|
||||
<a target="_blank" href="/API/ClientDownloads/MacOSInstaller-arm64">macOS arm64 Bash Installer</a>
|
||||
<a target="_blank" href="/API/ClientDownloads/MacOSInstaller-arm64/@_organizationId">macOS arm64 Bash Installer</a>
|
||||
<br />
|
||||
<a target="_blank" href="/Content/Remotely-MacOS-arm64.zip">macOS arm64 Files Only</a>
|
||||
</p>
|
||||
|
||||
@ -14,7 +14,8 @@ param (
|
||||
[string]$Path,
|
||||
[string]$OrganizationId,
|
||||
[string]$ServerUrl,
|
||||
[switch]$Uninstall
|
||||
[switch]$Uninstall,
|
||||
[switch]$Quiet
|
||||
)
|
||||
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
|
||||
@ -32,7 +33,7 @@ if ($OrganizationId) {
|
||||
|
||||
$ConnectionInfo = $null
|
||||
|
||||
if ([System.Environment]::Is64BitOperatingSystem){
|
||||
if ([System.Environment]::Is64BitOperatingSystem) {
|
||||
$Platform = "x64"
|
||||
}
|
||||
else {
|
||||
@ -41,20 +42,22 @@ else {
|
||||
|
||||
$InstallPath = "$env:ProgramFiles\Remotely"
|
||||
|
||||
function Write-Log($Message){
|
||||
Write-Host $Message
|
||||
function Write-Log($Message) {
|
||||
if (!$Quiet) {
|
||||
Write-Host $Message
|
||||
}
|
||||
"$((Get-Date).ToString()) - $Message" | Out-File -FilePath $LogPath -Append
|
||||
}
|
||||
function Do-Exit(){
|
||||
Write-Host "Exiting..."
|
||||
function Do-Exit() {
|
||||
Write-Log "Exiting..."
|
||||
Start-Sleep -Seconds 3
|
||||
exit
|
||||
}
|
||||
function Is-Administrator() {
|
||||
$Identity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$Principal = New-Object System.Security.Principal.WindowsPrincipal -ArgumentList $Identity
|
||||
return $Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
}
|
||||
$Identity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$Principal = New-Object System.Security.Principal.WindowsPrincipal -ArgumentList $Identity
|
||||
return $Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||
}
|
||||
|
||||
function Run-StartupChecks {
|
||||
|
||||
@ -86,6 +89,9 @@ function Run-StartupChecks {
|
||||
if ($Uninstall) {
|
||||
$Params += " -Uninstall"
|
||||
}
|
||||
if ($Quiet) {
|
||||
$Params += " -Quiet"
|
||||
}
|
||||
Start-Process -FilePath powershell.exe -ArgumentList $Params -Verb RunAs
|
||||
exit
|
||||
}
|
||||
@ -107,7 +113,7 @@ function Install-Remotely {
|
||||
$HeadResponse = Invoke-WebRequest -Uri "$HostName/Content/Remotely-Win-$Platform.zip" -Method Head -UseBasicParsing
|
||||
$ETag = $HeadResponse.Headers["ETag"]
|
||||
if (!$Etag) {
|
||||
Write-Host "Failed to get ETag from server. Aborting install."
|
||||
Write-Log "Failed to get ETag from server. Aborting install."
|
||||
}
|
||||
|
||||
if ((Test-Path -Path "$InstallPath") -and (Test-Path -Path "$InstallPath\ConnectionInfo.json")) {
|
||||
@ -124,9 +130,9 @@ function Install-Remotely {
|
||||
|
||||
if (!$ConnectionInfo) {
|
||||
$ConnectionInfo = @{
|
||||
DeviceID = (New-Guid).ToString();
|
||||
Host = $HostName;
|
||||
OrganizationID = $Organization;
|
||||
DeviceID = (New-Guid).ToString();
|
||||
Host = $HostName;
|
||||
OrganizationID = $Organization;
|
||||
ServerVerificationToken = "";
|
||||
}
|
||||
}
|
||||
@ -153,9 +159,9 @@ function Install-Remotely {
|
||||
}
|
||||
|
||||
Stop-Remotely
|
||||
Get-ChildItem -Path $InstallPath | Where-Object {$_.Name -notlike "ConnectionInfo.json"} | Remove-Item -Recurse -Force
|
||||
Get-ChildItem -Path $InstallPath | Where-Object { $_.Name -notlike "ConnectionInfo.json" } | Remove-Item -Recurse -Force
|
||||
|
||||
Expand-Archive -Path "$env:TEMP\Remotely-Win-$Platform.zip" -DestinationPath "$InstallPath" -Force
|
||||
Expand-Archive -Path "$env:TEMP\Remotely-Win-$Platform.zip" -DestinationPath "$InstallPath" -Force
|
||||
|
||||
New-Item -ItemType File -Path "$InstallPath\ConnectionInfo.json" -Value (ConvertTo-Json -InputObject $ConnectionInfo) -Force
|
||||
|
||||
@ -163,12 +169,12 @@ function Install-Remotely {
|
||||
|
||||
if ($DeviceAlias -or $DeviceGroup) {
|
||||
$DeviceSetupOptions = @{
|
||||
DeviceAlias = $DeviceAlias;
|
||||
DeviceAlias = $DeviceAlias;
|
||||
DeviceGroupName = $DeviceGroup;
|
||||
OrganizationID = $Organization;
|
||||
DeviceID = $ConnectionInfo.DeviceID;
|
||||
OrganizationID = $Organization;
|
||||
DeviceID = $ConnectionInfo.DeviceID;
|
||||
}
|
||||
|
||||
|
||||
$Body = $DeviceSetupOptions | ConvertTo-Json
|
||||
Invoke-RestMethod -Method Post -ContentType "application/json" -Uri "$HostName/api/devices" -Body $Body
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user