Last active
March 23, 2022 22:17
-
-
Save strund3r/aa4754cbc58f4a92b0d868ae7cf3272e to your computer and use it in GitHub Desktop.
Start CSGO and Aurora
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
# Add log color command to clipboard | |
Set-Clipboard -Value "log_color General FFD700FF; cl_showpos 1" | |
# Start CSGO | |
(New-Object -Com Shell.Application).Open("steam://rungameid/730") | |
Start-Sleep 10 | |
if ($Principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
# Start Aurora as Administrator | |
Start-Process -FilePath "C:\Program Files\Aurora\Aurora.exe" | |
# Wait for CSGO to close to close Aurora | |
Start-Sleep 60 | |
Wait-Process -Name "csgo" | |
$ProcAurora = Get-Process -Name "aurora" | |
Stop-Process -InputObject $ProcAurora -Force -PassThru | |
Get-Process | Where-Object { $_.HasExited } | |
} | |
else { | |
Start-Process -FilePath "powershell" -ArgumentList "$('-File ""')$(Get-Location)$('\')$($MyInvocation.MyCommand.Name)$('""')" -Verb runAs | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment