Skip to content

Instantly share code, notes, and snippets.

@strund3r
Last active March 23, 2022 22:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strund3r/aa4754cbc58f4a92b0d868ae7cf3272e to your computer and use it in GitHub Desktop.
Save strund3r/aa4754cbc58f4a92b0d868ae7cf3272e to your computer and use it in GitHub Desktop.
Start CSGO and Aurora
$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