Dynamically use current build number
Instead of hard coding the build number it now checks it dynamically to install the correct version. Hopefully addresses #21main
parent
c971217e06
commit
f274f52fe7
|
|
@ -42,7 +42,15 @@ param(
|
|||
# Note: These defaults should work for the regular current build of Microsoft Store, but I haven't tested using any of the other values. So fetching insider builds of MS Store (if any) might not work.
|
||||
$flightRing = "Retail" # Apparently accepts 'Retail', 'Internal', and 'External'
|
||||
$flightingBranchName = "" # Empty ( "" ) for normal release. Otherwise apparent possible values: Dev, Beta, ReleasePreview, MSIT, CanaryChannel, external
|
||||
$currentBranch = "ge_release" # "rs_prerelease" for insider, "ni_release" for normal release on Windows build below 26100, "ge_release" for normal release equal or above 26100
|
||||
|
||||
$osBuildNumber = [Environment]::OSVersion.Version.Build
|
||||
if ($osBuildNumber -ge 26100) {
|
||||
$currentBranch = "ge_release"
|
||||
} elseif ($osBuildNumber -ge 22000) {
|
||||
$currentBranch = "ni_release"
|
||||
} else {
|
||||
$currentBranch = "vb_release"
|
||||
}
|
||||
|
||||
# Random Notes:
|
||||
# flightRing should be "Internal" if flightingBranchName is "MSIT"
|
||||
|
|
@ -170,7 +178,7 @@ $fileListXmlTemplate = @"
|
|||
</ClientPreferredLanguages>
|
||||
<ProductsParameters>
|
||||
<SyncCurrentVersionOnly>false</SyncCurrentVersionOnly>
|
||||
<DeviceAttributes>E:BranchReadinessLevel=CB&CurrentBranch={2}&OEMModel=Virtual%20Machine&FlightRing={3}&AttrDataVer=321&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FlightingBranchName={4}&OSSkuId=48&App=WU_STORE&ProcessorManufacturer=GenuineIntel&OEMName_Uncleaned=Microsoft%20Corporation&AppVer=1407.2503.28012.0&OSArchitecture=AMD64&IsFlightingEnabled=1&TelemetryLevel=1&DefaultUserRegion=39070&WuClientVer=1310.2503.26012.0&OSVersion=10.0.26100.3915&DeviceFamily=Windows.Desktop</DeviceAttributes>
|
||||
<DeviceAttributes>E:BranchReadinessLevel=CB&CurrentBranch={2}&OEMModel=Virtual%20Machine&FlightRing={3}&AttrDataVer=321&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FlightingBranchName={4}&OSSkuId=48&App=WU_STORE&ProcessorManufacturer=GenuineIntel&OEMName_Uncleaned=Microsoft%20Corporation&AppVer=1407.2503.28012.0&OSArchitecture=AMD64&IsFlightingEnabled=1&TelemetryLevel=1&DefaultUserRegion=39070&WuClientVer=1310.2503.26012.0&OSVersion=10.0.$osBuildNumber.0&DeviceFamily=Windows.Desktop</DeviceAttributes>
|
||||
<CallerAttributes>Interactive=1;IsSeeker=1;</CallerAttributes>
|
||||
<Products/>
|
||||
</ProductsParameters>
|
||||
|
|
@ -202,7 +210,7 @@ $fileUrlXmlTemplate = @"
|
|||
<GetExtendedUpdateInfo2 xmlns="http://www.microsoft.com/SoftwareDistribution/Server/ClientWebService">
|
||||
<updateIDs><UpdateIdentity><UpdateID>{1}</UpdateID><RevisionNumber>{2}</RevisionNumber></UpdateIdentity></updateIDs>
|
||||
<infoTypes><XmlUpdateFragmentType>FileUrl</XmlUpdateFragmentType></infoTypes>
|
||||
<DeviceAttributes>E:BranchReadinessLevel=CB&CurrentBranch={3}&OEMModel=Virtual%20Machine&FlightRing={4}&AttrDataVer=321&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FlightingBranchName={5}&OSSkuId=48&App=WU_STORE&ProcessorManufacturer=GenuineIntel&OEMName_Uncleaned=Microsoft%20Corporation&AppVer=1407.2503.28012.0&OSArchitecture=AMD64&IsFlightingEnabled=1&TelemetryLevel=1&DefaultUserRegion=39070&WuClientVer=1310.2503.26012.0&OSVersion=10.0.26100.3915&DeviceFamily=Windows.Desktop</DeviceAttributes>
|
||||
<DeviceAttributes>E:BranchReadinessLevel=CB&CurrentBranch={3}&OEMModel=Virtual%20Machine&FlightRing={4}&AttrDataVer=321&InstallLanguage=en-US&OSUILocale=en-US&InstallationType=Client&FlightingBranchName={5}&OSSkuId=48&App=WU_STORE&ProcessorManufacturer=GenuineIntel&OEMName_Uncleaned=Microsoft%20Corporation&AppVer=1407.2503.28012.0&OSArchitecture=AMD64&IsFlightingEnabled=1&TelemetryLevel=1&DefaultUserRegion=39070&WuClientVer=1310.2503.26012.0&OSVersion=10.0.$osBuildNumber.0&DeviceFamily=Windows.Desktop</DeviceAttributes>
|
||||
</GetExtendedUpdateInfo2>
|
||||
</s:Body>
|
||||
</s:Envelope>
|
||||
|
|
|
|||
Loading…
Reference in New Issue