When you run the script with binaries already installed (and both the 2010 and 2013 subfolders are empty), the script picks the SharePoint version variable as "2010" or "2013", while this should be "14" or "15".
I've modified my version of the script, so (from line 56 on) it now reads:
```
# Check to see that we've at least specified the desired version in the XML
if ($xmlinput.Configuration.Install.SPVersion -eq "2010")
{
$env:spVer = "14"
}
elseif ($xmlinput.Configuration.Install.SPVersion -eq "2013")
{
$env:spVer = "15"
}
else {Throw " - Cannot determine version of SharePoint setup binaries, and no Version was specified in `"$(Split-Path -Path $inputFile -Leaf)`"."}
```
Not certain if this is the right way to handle this. For me, for the moment, it seems to work.
I've modified my version of the script, so (from line 56 on) it now reads:
```
# Check to see that we've at least specified the desired version in the XML
if ($xmlinput.Configuration.Install.SPVersion -eq "2010")
{
$env:spVer = "14"
}
elseif ($xmlinput.Configuration.Install.SPVersion -eq "2013")
{
$env:spVer = "15"
}
else {Throw " - Cannot determine version of SharePoint setup binaries, and no Version was specified in `"$(Split-Path -Path $inputFile -Leaf)`"."}
```
Not certain if this is the right way to handle this. For me, for the moment, it seems to work.