Created
January 12, 2019 20:57
-
-
Save ccallahan/f2b2fbe076883ea0407beb897d9fb0f7 to your computer and use it in GitHub Desktop.
This file contains 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
#You can Edit this part and change where Atlas is installed: | |
$AtlasDir = "C:\AtlasServer" # Only edit the part in quotes, leave the quotes. | |
$appID = "1006030" | |
#Nothing to edit past here | |
#Creating Atlas Folder | |
Write-Host "Creating Atlas Folder" | |
New-Item $AtlasDir -type Directory -ErrorAction SilentlyContinue | |
#Creating Steam Folder and downloading SteamCMD | |
Write-Host "Downloading SteamCMD" | |
$url = "https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip" | |
New-Item "$AtlasDir\SteamCMD" -type Directory -ErrorAction SilentlyContinue | |
$output = "$AtlasDir\SteamCMD\steamcmd.zip" | |
$start_time = Get-Date | |
Invoke-WebRequest -Uri $url -OutFile $output | |
Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)" | |
#Expanding SteamCMD.zip (Open the zip file and extract) | |
$SteamZip = "$AtlasDir\SteamCMD\steamcmd.zip" #the file name to extract | |
$SteamDestination = "$AtlasDir\SteamCMD" #the path to extract the file to | |
Remove-Item $AtlasDir\SteamCMD\steamcmd.exe -ErrorAction SilentlyContinue #Just in case this was alredy run once, I don't want to flood the user with text | |
Add-Type -assembly "system.io.compression.filesystem" #Required class to unzip the file | |
[io.compression.zipfile]::ExtractToDirectory($SteamZip, $SteamDestination) #unzip the file | |
Write-Host "Atlas is going to be installed to $AtlasDir - If you don't want it there, press CTRL+C now and change the path on line 2 of this script." -ForegroundColor Yellow | |
Write-Host "Giving you 5 seconds to change your mind" | |
sleep -Seconds 5 | |
#Installing Atlas Server | |
Write-Host "Installing Atlas. This will take a WHILE..." -ForegroundColor Yellow | |
powershell.exe "$AtlasDir\SteamCMD\steamcmd.exe" +login anonymous +force_install_dir $AtlasDir +app_update $appID validate +exit | |
#Open the Atlas Server Directory. | |
explorer $AtlasDir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment