Building off of what CyberCitizen said, this piece of PowerShell splits your computer names in to two pieces using the "." character as the delineation. I did it like this as I wasn't sure if your locations would have different lengths or not. You have to define your location names and what file to deploy for the specific location. I'm sure this could be improved upon as I'm a novice with PS.
Oh also the $PCNumber variable isn't actually used, but I figured in case you wanted to use it for something you would have it available.
#DeployByLocation.ps1
#Splits the computername variable in to a location and PC number using a . delimiter.
$SplitVariable = $env:computername.IndexOf(".")
$DeviceLocation = $env:computername.Substring(0, $SplitVariable)
$PCNumber = $env:computername.Substring($SplitVariable+1)
#Sets different install files based upon location.
#Must create variables for each install file.
$DE123456 = "C:\InstallFileForLocation1\File.exe"
$DE098765 = "C:\InstallFileForLocation2\File.exe"
#Checks against a list of locations. If the location exists, it runs the file specified in the variables above and exists. If it doesn't exist, the script just exits.
#Must add switch for each location so that it knows what to run.
Switch ($DeviceLocation) {
"DE123456" { & $DE123456; break }
"DE098765" { & $DE098765; break }
default { exit; break }
}