Skip to content

Commit

Permalink
feat: 📝 improve windows installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
OnCloud125252 committed May 22, 2024
1 parent 08b9320 commit f96647b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Test-Admin {
if ((Test-Admin) -eq $false) {
if ($elevated) {
} else {
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
Write-Host "This script requires Administrator privileges." -ForegroundColor $RED
}
exit
}
Expand All @@ -30,9 +30,9 @@ function Add-To-Path {
if ($currentPath -split ";" -notcontains $install_path) {
$newPath = $currentPath + ";" + $install_path
[Environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
Write-Host "Directory added to PATH variable successfully." -ForegroundColor Green
Write-Host "Directory added to PATH variable successfully." -ForegroundColor $Green
} else {
Write-Host "Directory is already in PATH variable." -ForegroundColor Yellow
Write-Host "Directory is already in PATH variable." -ForegroundColor $Yellow
}
}

Expand Down

0 comments on commit f96647b

Please sign in to comment.