diff --git a/RDPSign.bat b/RDPSign.bat index 5e7315b..f929bc3 100644 --- a/RDPSign.bat +++ b/RDPSign.bat @@ -2,11 +2,5 @@ rem Developed by Tanner Van Teeffelen rem Copyright ACO Services Inc. 2026 -rem Sets path equal to the location of the running script. -SET drivepath=%~dp0 - -rem Removes extra slash at the end of the drive path. -%drivepath:~0,-1% - rem Runs installer with the ExecutionPolicy set to bypass. -powershell.exe -executionpolicy bypass -file %drivepath%\RDPSign.ps1 \ No newline at end of file +powershell.exe -Command "Start-Process PowerShell -ArgumentList '-ExecutionPolicy Bypass -File ""%~dp0RDPSign.ps1""' -Verb RunAs" \ No newline at end of file diff --git a/RDPSign.ps1 b/RDPSign.ps1 index ced5997..8f2cd32 100644 --- a/RDPSign.ps1 +++ b/RDPSign.ps1 @@ -31,7 +31,7 @@ Write-Host "-------------------------------------------`n" -ForegroundColor Blue $rdpFile $certSubjectName -Write-Host "Before proceeding, please ensure that the .RDP file you select has the permissions you want" -ForegroundColor Green +Write-Host "Before proceeding, please ensure that the .RDP file you select has the permissions you want." -ForegroundColor Green Write-Host "This includes redirected printers, drives, and clipboard." -Foreground Green Write-Host "If you make a change to the .RDP file, please run this program again after making your changes.`n" -ForegroundColor Red Write-Host "Press any key to continue.`n" -ForegroundColor Green @@ -130,7 +130,7 @@ if (Test-Path $rdpFile) { rdpsign.exe /sha256 $thumbprint "$rdpFile" Write-Host "Success! RDP file is ready for use" -ForegroundColor Green } else { - Write-Error "Target RDP file not found at $rdpFile" + Write-Error "Target RDP file not found at $rdpFile" -ForegroundColor Red } Write-Host "Press any key to exit." -ForegroundColor Green