compat fixes

This commit is contained in:
psyirius 2024-08-21 03:31:44 -07:00
parent de3657adfa
commit 8bde2f3be3
2 changed files with 7 additions and 3 deletions

View File

@ -85,7 +85,9 @@ param(
$url = if (-not $Preview) {
# This must be pointing to the latest stable release (Chris-Hosted)
"https://christitus.com/win/stable"
# FIXME: change me to the below url and host me here
"https://christitus.com/win"
# "https://christitus.com/win/stable"
} else {
# This must be pointing to the latest pre-release or the release (GitHub releases)
Get-Latest-PreRelease-Url

View File

@ -16,8 +16,10 @@ param (
# Run as administrator if not already (only for script on disk, not in memory)
if (-not ([Security.Principal.WindowsPrincipal]([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$MyScriptPath = $MyInvocation.PSCommandPath
# If script not on disk, show error message and quit
if (-not $MyInvocation.MyCommand.Source) {
if (-not $MyScriptPath) {
Write-Host "===========================================" -Foregroundcolor Red
Write-Host "-- Scripts must be run as Administrator ---" -Foregroundcolor Red
Write-Host "-- Right-Click Start -> Terminal(Admin) ---" -Foregroundcolor Red
@ -37,7 +39,7 @@ param (
$PwshArgList = @(
"-NoLogo", # Don't print PowerShell header in CLI
"-NoProfile", # Don't load PowerShell profile
"-File", $MyInvocation.MyCommand.Source, # Script path
"-File", $MyScriptPath, # Script path
$args | ForEach-Object { $_ } # Script arguments
)