From 558b3f07fb59da79cf201f8e5fa80f33c8f77779 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Thu, 7 May 2020 14:25:51 -0700 Subject: [PATCH] Remove administrator check. --- Desktop.Win.Wrapper/Install.ps1 | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/Desktop.Win.Wrapper/Install.ps1 b/Desktop.Win.Wrapper/Install.ps1 index 8883ce67..5acdcae4 100644 --- a/Desktop.Win.Wrapper/Install.ps1 +++ b/Desktop.Win.Wrapper/Install.ps1 @@ -1,17 +1,6 @@ -function Is-Administrator() { - $Identity = [Security.Principal.WindowsIdentity]::GetCurrent() - $Principal = New-Object System.Security.Principal.WindowsPrincipal -ArgumentList $Identity - return $Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) -} - [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls13 [System.IO.Directory]::CreateDirectory("$env:AppData\Remotely") Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile "$env:AppData\Remotely\dotnet-install.ps1" -UseBasicParsing &"$env:AppData\Remotely\dotnet-install.ps1" -Runtime dotnet &"$env:AppData\Remotely\dotnet-install.ps1" -Runtime windowsdesktop -if (Is-Administrator) { - Start-Process -FilePath "dotnet.exe" -ArgumentList "$PSScriptRoot\Remotely_Desktop.dll" -WindowStyle Hidden -Verb RunAs -} -else { - Start-Process -FilePath "dotnet.exe" -ArgumentList "$PSScriptRoot\Remotely_Desktop.dll" -WindowStyle Hidden -} +Start-Process -FilePath "dotnet.exe" -ArgumentList "$PSScriptRoot\Remotely_Desktop.dll" -WindowStyle Hidden -Verb RunAs \ No newline at end of file