$filesToCopy = ("ParsecLogin.ps1", "ShowOverlayGuiMessageHandler.ps1", "StartEGS.ps1")
foreach($file in $filesToCopy)
{
    Copy-Item -Path $file -Destination "C:\AOFG\Autorun"
}


$filesToCopy = ("ParsecPasswordFillIn.ahk", "OCR.ahk", "ShowOverlayGuiMessage.ahk", "CloseParsecWindow.ahk", "RestartGPU.ps1")
foreach($file in $filesToCopy)
{
    Copy-Item -Path $file -Destination "C:\AOFG"
}

$filesToCopy = ("Autorun.vbs", "MouseTrailsReset.ahk", "DisableHyperVdisplay.ahk", "OCR.ahk")
foreach($file in $filesToCopy)
{
    Copy-Item -Path $file -Destination "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
}

$filesToCopy = Get-Item -Path ".\Extras\*.*"

Remove-Item -Path "C:\Users\$env:USERNAME\Desktop\MSI Afterburner.lnk" -Force -ErrorAction SilentlyContinue
# Parsec config
Copy-Item -Path ".\AppConfigs\Parsec\config.txt" -Destination "$env:ProgramData\Parsec"

# MSI Afterburner config
New-Item -Path "C:\Program Files (x86)\MSI Afterburner\Profiles" -ItemType Directory | Out-Null
Copy-Item -Path ".\AppConfigs\MSI Afterburner\MSIAfterburner.cfg" -Destination "C:\Program Files (x86)\MSI Afterburner\Profiles"

# RTSS Config
New-Item -Path "C:\Program Files (x86)\RivaTuner Statistics Server\Profiles" -ItemType Directory | Out-Null
foreach($file in Get-Item -Path ".\AppConfigs\RTSS\*.*")
{
    Copy-Item -Path $file -Destination "C:\Program Files (x86)\RivaTuner Statistics Server\Profiles"
}
