| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Windows/SystemApps/Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy/js/ |
Upload File : |
//
// Copyright (C) Microsoft. All rights reserved.
//
/// <disable>JS2085.EnableStrictMode</disable>
"use strict";
var CloudExperienceHost;
(function (CloudExperienceHost) {
var DeviceUser;
(function (DeviceUser) {
function createDeviceUser(username, password) {
return new WinJS.Promise(function (completeDispatch, errorDispatch, progressDispatch) {
let provider = new Windows.Security.Cryptography.DataProtection.DataProtectionProvider("local=user");
let binary = Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(password, Windows.Security.Cryptography.BinaryStringEncoding.utf8);
// Chaining promises to first encrypt the password and then pass it to the API to create the account
provider.protectAsync(binary).then(function (protectedData) {
let deviceUserManager = new Microsoft.ResourceAccountManager.ResourceAccountSetup();
return deviceUserManager.createResourceAccountWithAADAccountAsync(username, protectedData);
})
.done(function () { completeDispatch(); }, function (err) { errorDispatch(err); }, function (progress) { progressDispatch(progress); });
});
}
DeviceUser.createDeviceUser = createDeviceUser;
function activateLicense(contentId, policyId) {
return new WinJS.Promise(function (completeDispatch, errorDispatch) {
let deviceUserManager = new Microsoft.ResourceAccountManager.ResourceAccountLicense();
deviceUserManager.activateLicenseAsync(contentId, policyId).done(completeDispatch, errorDispatch);
});
}
DeviceUser.activateLicense = activateLicense;
function shouldSkipForAutopilot() {
return EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotUtilStatics.getOobeSettingsOverrideAsync(EnterpriseDeviceManagement.Service.AutoPilot.AutoPilotOobeSetting.aadAuthUsingDeviceTicket);
}
DeviceUser.shouldSkipForAutopilot = shouldSkipForAutopilot;
function getUPN() {
return new WinJS.Promise(function (completeDispatch, errorDispatch) {
let deviceUserManager = new Microsoft.ResourceAccountManager.ResourceAccountSetup();
completeDispatch(deviceUserManager.upn);
});
}
DeviceUser.getUPN = getUPN;
})(CloudExperienceHost.DeviceUser || (CloudExperienceHost.DeviceUser = {}));
})(CloudExperienceHost || (CloudExperienceHost = {}));