FILE: C:\Windows\SystemApps\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\js\autoPilot.js

--
// // Copyright (C) Microsoft. All rights reserved. // "use strict"; var CloudExperienceHost; (function (CloudExperienceHost) { var AutoPilot; (function (AutoPilot) { var ShouldSkipAutoPilot; (function (ShouldSkipAutoPilot) { function getShouldSkipAsync() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { try { EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getOobeSettingsOverrideAsync(EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotOobeSetting.aadAuthUsingDeviceTicket).then(function (result) { if (result == true) { // Show the Veto Page completeDispatch(false); } else { // Skip the Plug and Forget OOBE flow completeDispatch(true); } }, errorDispatch); } catch (err) { // If an exception is thrown, skip the veto page and resume through the Consumer OOBE flow CloudExperienceHost.Telemetry.logEvent("Autopilot_ActivationPage_GetShouldSkipAsyncFailed", JSON.stringify({ error: err })); completeDispatch(true); } }); } ShouldSkipAutoPilot.getShouldSkipAsync = getShouldSkipAsync; })(ShouldSkipAutoPilot = AutoPilot.ShouldSkipAutoPilot || (AutoPilot.ShouldSkipAutoPilot = {})); var Activation; (function (Activation) { function getShouldSkipAsync() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { try { CloudExperienceHostAPI.UtilStaticsCore.isNetworkRequiredAsync().then(function (result) { CloudExperienceHost.Telemetry.logEvent(result ? "AutoPilot_ActivationPage_PreLoadCheckCompleted_NoSkipping" : "AutoPilot_ActivationPage_PreLoadCheckCompleted_Skipping"); completeDispatch(!result); }, errorDispatch); } catch (err) { CloudExperienceHost.Telemetry.logEvent("AutoPilot_ActivationPage_PreLoadCheckFailed", JSON.stringify({ error: err })) completeDispatch(true); } }); } Activation.getShouldSkipAsync = getShouldSkipAsync; })(Activation = AutoPilot.Activation || (AutoPilot.Activation = {})); function isDevicePlugAndForgetAsync() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getOobeSettingsOverrideAsync(EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotOobeSetting.aadAuthUsingDeviceTicket).then(function (result) { // If result is true, proceed with the Plug and Forget Scenario. Else, proceed with the normal flow. completeDispatch(result); }, function (e) { // Default to normal flow completeDispatch(false); }); }); } AutoPilot.isDevicePlugAndForgetAsync = isDevicePlugAndForgetAsync; function disableAutoPilotAsync() { return new WinJS.Promise(function (completeDispatch, errorDispatch) { EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.disableAsync().then(function () { CloudExperienceHost.setRebootForOOBE(); completeDispatch(true); }); }); } AutoPilot.disableAutoPilotAsync = disableAutoPilotAsync; function getDwordPolicyAsync(policyName) { return new WinJS.Promise(function (completeDispatch, errorDispatch) { EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getDwordPolicyAsync(policyName).done(completeDispatch, errorDispatch); }); } AutoPilot.getDwordPolicyAsync = getDwordPolicyAsync; function getStringPolicyAsync(policyName) { return new WinJS.Promise(function (completeDispatch, errorDispatch) { EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getStringPolicyAsync(policyName).done(completeDispatch, errorDispatch); }); } AutoPilot.getStringPolicyAsync = getStringPolicyAsync; // This function creates the query string part of the URL to pass-in the ZTD tenant name to eSTS. // This is required to be passed-in up front as opposed to using the CXH bridge since the branding elements are burned into the page upon generation. function getZTDQueryStringAsync() { return EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getStringPolicyAsync("CloudAssignedTenantDomain").then(function (result) { let ztdQueryString = ""; if (result) { ztdQueryString += "ztd_tenant=" + encodeURIComponent(result); } return ztdQueryString; }); } AutoPilot.getZTDQueryStringAsync = getZTDQueryStringAsync; })(AutoPilot = CloudExperienceHost.AutoPilot || (CloudExperienceHost.AutoPilot = {})); })(CloudExperienceHost || (CloudExperienceHost = {}));
--