mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Refactor runSSD function to handle ARM64 OOBE
Removed commented-out screenshot logic and added ARM64 handling for OOBE dialogs.
This commit is contained in:
@@ -85,26 +85,24 @@ function launchSSD() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function runSSD() {
|
async function runSSD() {
|
||||||
await takeScreenshot('001.png');
|
const runner_arch = process.env.RUNNER_ARCH;
|
||||||
minimizeAllWindows();
|
if ( runner_arch === "ARM64" ) {
|
||||||
await sleep(2000);
|
console.log('Running on ARM64. Attempting to kill OOBE dialogs...');
|
||||||
await takeScreenshot('002.png');
|
await takeScreenshot('oob_before.png');
|
||||||
sendKeys('{ESC}');
|
|
||||||
await sleep(2000);
|
|
||||||
await takeScreenshot('003.png');
|
|
||||||
//sendKeys('{ESC}');
|
|
||||||
//await sleep(2000);
|
|
||||||
//await takeScreenshot('004.png');
|
|
||||||
//sendKeys('{ESC}');
|
|
||||||
//await sleep(2000);
|
|
||||||
//await takeScreenshot('005.png');
|
|
||||||
//sendKeys('%{F4}');
|
|
||||||
//await sleep(2000);
|
|
||||||
//await takeScreenshot('006.png');
|
|
||||||
//sendKeys('%{F4}');
|
|
||||||
//await sleep(2000);
|
|
||||||
//await takeScreenshot('007.png');
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Force kill the Windows Out-Of-Box Experience host
|
||||||
|
execSync('taskkill /F /IM CloudExperienceHost.exe /T');
|
||||||
|
console.log('Successfully terminated CloudExperienceHost.');
|
||||||
|
} catch (err) {
|
||||||
|
console.log('CloudExperienceHost was not running or could not be killed.');
|
||||||
|
}
|
||||||
|
|
||||||
|
await sleep(3000); // Give the desktop a moment to settle
|
||||||
|
await takeScreenshot('oob_after.png');
|
||||||
|
} else {
|
||||||
|
console.log('NOT running on ARM64');
|
||||||
|
}
|
||||||
// Re-execute SSD to open login dialog
|
// Re-execute SSD to open login dialog
|
||||||
launchSSD();
|
launchSSD();
|
||||||
await sleep(3000);
|
await sleep(3000);
|
||||||
|
|||||||
Reference in New Issue
Block a user