update git check
This commit is contained in:
@@ -22,13 +22,13 @@ if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
|
|||||||
|
|
||||||
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
||||||
|
|
||||||
# Check for updates from Gitea repository
|
# Self-update function for the script
|
||||||
|
function Update-Scripts {
|
||||||
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
||||||
$baseUrl = "https://gitea.andrewspolytechnic.com"
|
|
||||||
$repoPath = "sandrews/windows-install"
|
|
||||||
$updateScriptDir = $PSScriptRoot
|
$updateScriptDir = $PSScriptRoot
|
||||||
$lastUpdateCheck = $null
|
$lastUpdateCheck = $null
|
||||||
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
||||||
|
$zipUrl = "https://gitea.andrewspolytechnic.com/public/windows-install/archive/master.zip"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Check if we've checked for updates in the last 24 hours
|
# Check if we've checked for updates in the last 24 hours
|
||||||
@@ -37,52 +37,31 @@ try {
|
|||||||
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
||||||
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
||||||
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
||||||
# Continue with the script
|
return $false # No update performed
|
||||||
} else {
|
|
||||||
# Time to check for updates again
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
# First time running update check
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($checkForUpdates) {
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory to download files
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
# Try different URL patterns for Gitea zip download
|
|
||||||
$possibleUrls = @(
|
|
||||||
"$baseUrl/$repoPath/archive/master.zip",
|
|
||||||
"$baseUrl/$repoPath/archive/refs/heads/master.zip",
|
|
||||||
"$baseUrl/api/v1/repos/$repoPath/archive/master.zip"
|
|
||||||
)
|
|
||||||
|
|
||||||
$downloadSuccess = $false
|
|
||||||
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
||||||
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
||||||
|
|
||||||
foreach ($zipUrl in $possibleUrls) {
|
Write-Host "Downloading updates from $zipUrl..." -ForegroundColor Cyan
|
||||||
Write-Host "Trying to download updates from $zipUrl..." -ForegroundColor Cyan
|
|
||||||
try {
|
try {
|
||||||
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 10
|
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 30
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to download from URL: $_" -ForegroundColor DarkGray
|
||||||
|
return $false # Failed to download
|
||||||
|
}
|
||||||
|
|
||||||
# Check if the download was successful (file exists and is not empty)
|
# Check if the download was successful (file exists and is not empty)
|
||||||
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
||||||
$downloadSuccess = $true
|
|
||||||
Write-Host "Download successful!" -ForegroundColor Green
|
Write-Host "Download successful!" -ForegroundColor Green
|
||||||
break # Exit the loop if download was successful
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Host "Failed with this URL: $_" -ForegroundColor DarkGray
|
|
||||||
# Continue to the next URL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($downloadSuccess) {
|
|
||||||
try {
|
|
||||||
# Extract the zip file
|
# Extract the zip file
|
||||||
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
||||||
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
||||||
@@ -110,6 +89,7 @@ try {
|
|||||||
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
return $true # Update performed successfully
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
@@ -117,7 +97,7 @@ try {
|
|||||||
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not download updates from any of the tried URLs." -ForegroundColor Yellow
|
Write-Host "Could not download updates. Please check your internet connection." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
@@ -128,11 +108,16 @@ try {
|
|||||||
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return $false # Update failed
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
||||||
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
||||||
|
return $false # Update failed
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the update function at the beginning
|
||||||
|
$scriptUpdated = Update-Scripts
|
||||||
|
|
||||||
[Environment]::UserName
|
[Environment]::UserName
|
||||||
$uid = $Env:UserName # Get current username for use in paths
|
$uid = $Env:UserName # Get current username for use in paths
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
|
|||||||
|
|
||||||
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
||||||
|
|
||||||
# Check for updates from Gitea repository
|
# Self-update function for the script
|
||||||
|
function Update-Scripts {
|
||||||
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
||||||
$baseUrl = "https://gitea.andrewspolytechnic.com"
|
|
||||||
$repoPath = "sandrews/windows-install"
|
|
||||||
$updateScriptDir = $PSScriptRoot
|
$updateScriptDir = $PSScriptRoot
|
||||||
$lastUpdateCheck = $null
|
$lastUpdateCheck = $null
|
||||||
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
||||||
|
$zipUrl = "https://gitea.andrewspolytechnic.com/public/windows-install/archive/master.zip"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Check if we've checked for updates in the last 24 hours
|
# Check if we've checked for updates in the last 24 hours
|
||||||
@@ -37,52 +37,31 @@ try {
|
|||||||
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
||||||
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
||||||
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
||||||
# Continue with the script
|
return $false # No update performed
|
||||||
} else {
|
|
||||||
# Time to check for updates again
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
# First time running update check
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($checkForUpdates) {
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory to download files
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
# Try different URL patterns for Gitea zip download
|
|
||||||
$possibleUrls = @(
|
|
||||||
"$baseUrl/$repoPath/archive/master.zip",
|
|
||||||
"$baseUrl/$repoPath/archive/refs/heads/master.zip",
|
|
||||||
"$baseUrl/api/v1/repos/$repoPath/archive/master.zip"
|
|
||||||
)
|
|
||||||
|
|
||||||
$downloadSuccess = $false
|
|
||||||
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
||||||
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
||||||
|
|
||||||
foreach ($zipUrl in $possibleUrls) {
|
Write-Host "Downloading updates from $zipUrl..." -ForegroundColor Cyan
|
||||||
Write-Host "Trying to download updates from $zipUrl..." -ForegroundColor Cyan
|
|
||||||
try {
|
try {
|
||||||
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 10
|
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 30
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to download from URL: $_" -ForegroundColor DarkGray
|
||||||
|
return $false # Failed to download
|
||||||
|
}
|
||||||
|
|
||||||
# Check if the download was successful (file exists and is not empty)
|
# Check if the download was successful (file exists and is not empty)
|
||||||
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
||||||
$downloadSuccess = $true
|
|
||||||
Write-Host "Download successful!" -ForegroundColor Green
|
Write-Host "Download successful!" -ForegroundColor Green
|
||||||
break # Exit the loop if download was successful
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Host "Failed with this URL: $_" -ForegroundColor DarkGray
|
|
||||||
# Continue to the next URL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($downloadSuccess) {
|
|
||||||
try {
|
|
||||||
# Extract the zip file
|
# Extract the zip file
|
||||||
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
||||||
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
||||||
@@ -110,6 +89,7 @@ try {
|
|||||||
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
return $true # Update performed successfully
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
@@ -117,7 +97,7 @@ try {
|
|||||||
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not download updates from any of the tried URLs." -ForegroundColor Yellow
|
Write-Host "Could not download updates. Please check your internet connection." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
@@ -128,11 +108,16 @@ try {
|
|||||||
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return $false # Update failed
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
||||||
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
||||||
|
return $false # Update failed
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the update function at the beginning
|
||||||
|
$scriptUpdated = Update-Scripts
|
||||||
|
|
||||||
$uid = $Env:UserName
|
$uid = $Env:UserName
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
|
|||||||
|
|
||||||
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
Write-Host "Running with administrator privileges." -ForegroundColor Green
|
||||||
|
|
||||||
# Check for updates from Gitea repository
|
# Self-update function for the script
|
||||||
|
function Update-Scripts {
|
||||||
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
Write-Host "Checking for updates..." -ForegroundColor Cyan
|
||||||
$baseUrl = "https://gitea.andrewspolytechnic.com"
|
|
||||||
$repoPath = "sandrews/windows-install"
|
|
||||||
$updateScriptDir = $PSScriptRoot
|
$updateScriptDir = $PSScriptRoot
|
||||||
$lastUpdateCheck = $null
|
$lastUpdateCheck = $null
|
||||||
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
$updateCheckFile = Join-Path -Path $updateScriptDir -ChildPath "last_update_check.txt"
|
||||||
|
$zipUrl = "https://gitea.andrewspolytechnic.com/public/windows-install/archive/master.zip"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
# Check if we've checked for updates in the last 24 hours
|
# Check if we've checked for updates in the last 24 hours
|
||||||
@@ -37,52 +37,31 @@ try {
|
|||||||
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
$timeSinceLastCheck = (Get-Date) - $lastUpdateCheck
|
||||||
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
if ($timeSinceLastCheck.TotalHours -lt 24) {
|
||||||
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
Write-Host "Last update check was less than 24 hours ago. Skipping update check." -ForegroundColor DarkGray
|
||||||
# Continue with the script
|
return $false # No update performed
|
||||||
} else {
|
|
||||||
# Time to check for updates again
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
# First time running update check
|
|
||||||
$checkForUpdates = $true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($checkForUpdates) {
|
|
||||||
# Create a temporary directory to download files
|
# Create a temporary directory to download files
|
||||||
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
$tempDir = Join-Path -Path $env:TEMP -ChildPath "windows-install-update"
|
||||||
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
if (Test-Path $tempDir) { Remove-Item $tempDir -Recurse -Force }
|
||||||
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
New-Item -ItemType Directory -Path $tempDir -Force | Out-Null
|
||||||
|
|
||||||
# Try different URL patterns for Gitea zip download
|
|
||||||
$possibleUrls = @(
|
|
||||||
"$baseUrl/$repoPath/archive/master.zip",
|
|
||||||
"$baseUrl/$repoPath/archive/refs/heads/master.zip",
|
|
||||||
"$baseUrl/api/v1/repos/$repoPath/archive/master.zip"
|
|
||||||
)
|
|
||||||
|
|
||||||
$downloadSuccess = $false
|
|
||||||
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
$zipPath = Join-Path -Path $tempDir -ChildPath "update.zip"
|
||||||
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
$ProgressPreference = 'SilentlyContinue' # Hide progress bar to speed up download
|
||||||
|
|
||||||
foreach ($zipUrl in $possibleUrls) {
|
Write-Host "Downloading updates from $zipUrl..." -ForegroundColor Cyan
|
||||||
Write-Host "Trying to download updates from $zipUrl..." -ForegroundColor Cyan
|
|
||||||
try {
|
try {
|
||||||
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 10
|
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing -TimeoutSec 30
|
||||||
|
} catch {
|
||||||
|
Write-Host "Failed to download from URL: $_" -ForegroundColor DarkGray
|
||||||
|
return $false # Failed to download
|
||||||
|
}
|
||||||
|
|
||||||
# Check if the download was successful (file exists and is not empty)
|
# Check if the download was successful (file exists and is not empty)
|
||||||
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
if (Test-Path $zipPath -and (Get-Item $zipPath).Length -gt 0) {
|
||||||
$downloadSuccess = $true
|
|
||||||
Write-Host "Download successful!" -ForegroundColor Green
|
Write-Host "Download successful!" -ForegroundColor Green
|
||||||
break # Exit the loop if download was successful
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
Write-Host "Failed with this URL: $_" -ForegroundColor DarkGray
|
|
||||||
# Continue to the next URL
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($downloadSuccess) {
|
|
||||||
try {
|
|
||||||
# Extract the zip file
|
# Extract the zip file
|
||||||
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
Write-Host "Extracting update package..." -ForegroundColor Cyan
|
||||||
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
Expand-Archive -Path $zipPath -DestinationPath $tempDir -Force
|
||||||
@@ -110,6 +89,7 @@ try {
|
|||||||
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
Start-Process PowerShell -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
return $true # Update performed successfully
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
Write-Host "Could not find extracted update directory." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
@@ -117,7 +97,7 @@ try {
|
|||||||
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
Write-Host "Error extracting or installing updates: $_" -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Write-Host "Could not download updates from any of the tried URLs." -ForegroundColor Yellow
|
Write-Host "Could not download updates. Please check your internet connection." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
@@ -128,11 +108,16 @@ try {
|
|||||||
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
Write-Host "Could not clean up temp directory: $_" -ForegroundColor DarkGray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return $false # Update failed
|
||||||
} catch {
|
} catch {
|
||||||
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
Write-Host "Error checking for updates: $_" -ForegroundColor Yellow
|
||||||
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
Write-Host "Continuing with current version..." -ForegroundColor Yellow
|
||||||
|
return $false # Update failed
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the update function at the beginning
|
||||||
|
$scriptUpdated = Update-Scripts
|
||||||
|
|
||||||
$uid = $Env:UserName
|
$uid = $Env:UserName
|
||||||
# Get the directory where this script is located
|
# Get the directory where this script is located
|
||||||
|
|||||||
Reference in New Issue
Block a user