Merge pull request 'Add support for NetFX updates' (#1) from abbodi1406/api:master into master
Reviewed-on: #1
This commit is contained in:
commit
c1f00cecbd
15
fetchupd.php
15
fetchupd.php
@ -295,6 +295,15 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
|||||||
$foundBuild = @$info[3];
|
$foundBuild = @$info[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$isNet = 0;
|
||||||
|
if(strpos($foundArch, 'netfx') !== false) {
|
||||||
|
$isNet = 1;
|
||||||
|
preg_match('/ProductReleaseInstalled Name\=".*\.(.*?)\.(.*?)" Version\=".*\.\d{5}\.(.*?)"/', $updateInfo, $info);
|
||||||
|
$foundType = @strtolower($info[1]);
|
||||||
|
$foundArch = @strtolower($info[2]);
|
||||||
|
$foundBuild = @$info[3];
|
||||||
|
}
|
||||||
|
|
||||||
$updateTitle = preg_grep('/<Title>.*<\/Title>/', $updateMeta);
|
$updateTitle = preg_grep('/<Title>.*<\/Title>/', $updateMeta);
|
||||||
sort($updateTitle);
|
sort($updateTitle);
|
||||||
|
|
||||||
@ -314,7 +323,11 @@ function parseFetchUpdate($updateInfo, $out, $arch, $ring, $flight, $build, $sku
|
|||||||
$isCumulativeUpdate = 0;
|
$isCumulativeUpdate = 0;
|
||||||
if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update|Microsoft Edge|Windows Feature Experience Pack|Cumulative security Hotpatch/i', $updateTitle)) {
|
if(preg_match('/\d{4}-\d{2}.+Update|Cumulative Update|Microsoft Edge|Windows Feature Experience Pack|Cumulative security Hotpatch/i', $updateTitle)) {
|
||||||
$isCumulativeUpdate = 1;
|
$isCumulativeUpdate = 1;
|
||||||
$updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle);
|
if($isNet) {
|
||||||
|
$updateTitle = preg_replace("/3.5 and 4.8.1 |3.5 and 4.8 | for $foundArch| for x64| \(KB.*?\)/i", '', $updateTitle);
|
||||||
|
} else {
|
||||||
|
$updateTitle = preg_replace('/ for .{3,5}-based systems| \(KB.*?\)/i', '', $updateTitle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$updateTitle = preg_replace("/ ?\d{4}-\d{2}\D ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle);
|
$updateTitle = preg_replace("/ ?\d{4}-\d{2}\D ?| ?$foundArch ?| ?x64 ?/i", '', $updateTitle);
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function uupApiVersion() {
|
function uupApiVersion() {
|
||||||
return '1.47.3';
|
return '1.47.4';
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/auths.php';
|
require_once dirname(__FILE__).'/auths.php';
|
||||||
|
@ -33,12 +33,14 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type, $fl
|
|||||||
|
|
||||||
$dvcFamily = 'Windows.Desktop';
|
$dvcFamily = 'Windows.Desktop';
|
||||||
$insType = 'Client';
|
$insType = 'Client';
|
||||||
|
$prodType = 'WinNT';
|
||||||
if($sku == 119) {
|
if($sku == 119) {
|
||||||
$dvcFamily = 'Windows.Team';
|
$dvcFamily = 'Windows.Team';
|
||||||
}
|
}
|
||||||
if(uupApiIsServer($sku)) {
|
if(uupApiIsServer($sku)) {
|
||||||
$dvcFamily = 'Windows.Server';
|
$dvcFamily = 'Windows.Server';
|
||||||
$insType = 'Server';
|
$insType = 'Server';
|
||||||
|
$prodType = 'ServerNT';
|
||||||
$blockUpgrades = 1;
|
$blockUpgrades = 1;
|
||||||
}
|
}
|
||||||
/*/ Hololens
|
/*/ Hololens
|
||||||
@ -114,7 +116,7 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type, $fl
|
|||||||
$attrib = array(
|
$attrib = array(
|
||||||
'App=WU_OS',
|
'App=WU_OS',
|
||||||
'AppVer='.$build,
|
'AppVer='.$build,
|
||||||
'AttrDataVer=247',
|
'AttrDataVer=281',
|
||||||
'AllowInPlaceUpgrade=1',
|
'AllowInPlaceUpgrade=1',
|
||||||
'AllowOptionalContent=1',
|
'AllowOptionalContent=1',
|
||||||
'AllowUpgradesWithUnsupportedTPMOrCPU=1',
|
'AllowUpgradesWithUnsupportedTPMOrCPU=1',
|
||||||
@ -122,6 +124,8 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type, $fl
|
|||||||
'BranchReadinessLevel=CB',
|
'BranchReadinessLevel=CB',
|
||||||
'CIOptin=1',
|
'CIOptin=1',
|
||||||
'CurrentBranch='.$branch,
|
'CurrentBranch='.$branch,
|
||||||
|
'DataExpDateEpoch_GE24H2='.(time()+82800),
|
||||||
|
'DataExpDateEpoch_GE24H2Setup='.(time()+82800),
|
||||||
'DataExpDateEpoch_CU23H2='.(time()+82800),
|
'DataExpDateEpoch_CU23H2='.(time()+82800),
|
||||||
'DataExpDateEpoch_CU23H2Setup='.(time()+82800),
|
'DataExpDateEpoch_CU23H2Setup='.(time()+82800),
|
||||||
'DataExpDateEpoch_NI22H2='.(time()+82800),
|
'DataExpDateEpoch_NI22H2='.(time()+82800),
|
||||||
@ -144,13 +148,15 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type, $fl
|
|||||||
//'FlightContent='.$fltContent,
|
//'FlightContent='.$fltContent,
|
||||||
'FlightRing='.$fltRing,
|
'FlightRing='.$fltRing,
|
||||||
'Free=gt64',
|
'Free=gt64',
|
||||||
|
'GStatus_GE24H2=2',
|
||||||
|
'GStatus_GE24H2Setup=2',
|
||||||
'GStatus_CU23H2=2',
|
'GStatus_CU23H2=2',
|
||||||
'GStatus_CU23H2Setup=2',
|
'GStatus_CU23H2Setup=2',
|
||||||
|
'GStatus_NI23H2=2',
|
||||||
'GStatus_NI22H2=2',
|
'GStatus_NI22H2=2',
|
||||||
'GStatus_NI22H2Setup=2',
|
'GStatus_NI22H2Setup=2',
|
||||||
'GStatus_CO21H2=2',
|
'GStatus_CO21H2=2',
|
||||||
'GStatus_CO21H2Setup=2',
|
'GStatus_CO21H2Setup=2',
|
||||||
'GStatus_23H2=2',
|
|
||||||
'GStatus_22H2=2',
|
'GStatus_22H2=2',
|
||||||
'GStatus_21H2=2',
|
'GStatus_21H2=2',
|
||||||
'GStatus_21H1=2',
|
'GStatus_21H1=2',
|
||||||
@ -182,18 +188,21 @@ function composeDeviceAttributes($flight, $ring, $build, $arch, $sku, $type, $fl
|
|||||||
'ProcessorIdentifier=Intel64 Family 6 Model 186 Stepping 3',
|
'ProcessorIdentifier=Intel64 Family 6 Model 186 Stepping 3',
|
||||||
'ProcessorManufacturer=GenuineIntel',
|
'ProcessorManufacturer=GenuineIntel',
|
||||||
'ProcessorModel=13th Gen Intel(R) Core(TM) i7-1355U',
|
'ProcessorModel=13th Gen Intel(R) Core(TM) i7-1355U',
|
||||||
|
'ProductType='.$prodType,
|
||||||
'ReleaseType='.$type,
|
'ReleaseType='.$type,
|
||||||
'SdbVer_20H1=2000000000',
|
'SdbVer_20H1=2000000000',
|
||||||
'SdbVer_19H1=2000000000',
|
'SdbVer_19H1=2000000000',
|
||||||
'SecureBootCapable=1',
|
'SecureBootCapable=1',
|
||||||
'TelemetryLevel=3',
|
'TelemetryLevel=3',
|
||||||
|
'TimestampEpochString_GE24H2='.(time()-3600),
|
||||||
|
'TimestampEpochString_GE24H2Setup='.(time()-3600),
|
||||||
'TimestampEpochString_CU23H2='.(time()-3600),
|
'TimestampEpochString_CU23H2='.(time()-3600),
|
||||||
'TimestampEpochString_CU23H2Setup='.(time()-3600),
|
'TimestampEpochString_CU23H2Setup='.(time()-3600),
|
||||||
|
'TimestampEpochString_NI23H2='.(time()-3600),
|
||||||
'TimestampEpochString_NI22H2='.(time()-3600),
|
'TimestampEpochString_NI22H2='.(time()-3600),
|
||||||
'TimestampEpochString_NI22H2Setup='.(time()-3600),
|
'TimestampEpochString_NI22H2Setup='.(time()-3600),
|
||||||
'TimestampEpochString_CO21H2='.(time()-3600),
|
'TimestampEpochString_CO21H2='.(time()-3600),
|
||||||
'TimestampEpochString_CO21H2Setup='.(time()-3600),
|
'TimestampEpochString_CO21H2Setup='.(time()-3600),
|
||||||
'TimestampEpochString_23H2='.(time()-3600),
|
|
||||||
'TimestampEpochString_22H2='.(time()-3600),
|
'TimestampEpochString_22H2='.(time()-3600),
|
||||||
'TimestampEpochString_21H2='.(time()-3600),
|
'TimestampEpochString_21H2='.(time()-3600),
|
||||||
'TimestampEpochString_21H1='.(time()-3600),
|
'TimestampEpochString_21H1='.(time()-3600),
|
||||||
@ -441,7 +450,7 @@ function composeFetchUpdRequest($arch, $flight, $ring, $build, $sku = 48, $type
|
|||||||
$products[] = "PN=$mainProduct.$currArch&Branch=$branch&PrimaryOSProduct=1&Repairable=1&V=$build&ReofferUpdate=1";
|
$products[] = "PN=$mainProduct.$currArch&Branch=$branch&PrimaryOSProduct=1&Repairable=1&V=$build&ReofferUpdate=1";
|
||||||
$products[] = "PN=Adobe.Flash.$currArch&Repairable=1&V=0.0.0.0";
|
$products[] = "PN=Adobe.Flash.$currArch&Repairable=1&V=0.0.0.0";
|
||||||
$products[] = "PN=Microsoft.Edge.Stable.$currArch&Repairable=1&V=0.0.0.0";
|
$products[] = "PN=Microsoft.Edge.Stable.$currArch&Repairable=1&V=0.0.0.0";
|
||||||
$products[] = "PN=Microsoft.NETFX.$currArch&V=2018.12.2.0";
|
$products[] = "PN=Microsoft.NETFX.$currArch&V=0.0.0.0";
|
||||||
$products[] = "PN=Windows.Autopilot.$currArch&Repairable=1&V=0.0.0.0";
|
$products[] = "PN=Windows.Autopilot.$currArch&Repairable=1&V=0.0.0.0";
|
||||||
$products[] = "PN=Windows.AutopilotOOBE.$currArch&Repairable=1&V=0.0.0.0";
|
$products[] = "PN=Windows.AutopilotOOBE.$currArch&Repairable=1&V=0.0.0.0";
|
||||||
$products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build";
|
$products[] = "PN=Windows.Appraiser.$currArch&Repairable=1&V=$build";
|
||||||
|
Loading…
Reference in New Issue
Block a user