From 27ceb05f23eb41b7a7e0c91211a7859b4ce132c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Dec 2026 08:28:28 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Windows=20OEM=20setup=20r?= =?UTF-8?q?esumes=20on=20the=20next=20boot=20when=20interrupted=20(RunOnce?= =?UTF-8?q?=20re-arm=20until=20finished.txt);=20a=20Build=20cancelled=20du?= =?UTF-8?q?ring=20first=20logon=20left=20the=20VM=20without=20sshd=20forev?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/release/install.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/client/src/release/install.bat b/crates/client/src/release/install.bat index cd7815d..e972c33 100644 --- a/crates/client/src/release/install.bat +++ b/crates/client/src/release/install.bat @@ -1,7 +1,10 @@ @echo off +if exist C:\OEM\finished.txt exit /b +reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v yumush /d C:\OEM\install.bat /f powershell -NoProfile -ExecutionPolicy Bypass -Command "Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0; Set-Service sshd -StartupType Automatic; Start-Service sshd; New-NetFirewallRule -Name sshd -DisplayName sshd -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 -ErrorAction SilentlyContinue; Set-Content -Path C:\ProgramData\ssh\administrators_authorized_keys -Value '{key}'; icacls C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r /grant 'Administrators:F' /grant 'SYSTEM:F'; New-ItemProperty -Path 'HKLM:\SOFTWARE\OpenSSH' -Name DefaultShell -Value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -PropertyType String -Force" curl.exe -L -o C:\vs_BuildTools.exe https://aka.ms/vs/17/release/vs_BuildTools.exe C:\vs_BuildTools.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended curl.exe -L -o C:\rustup-init.exe https://win.rustup.rs/x86_64 C:\rustup-init.exe -y --default-toolchain none --profile minimal +reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v yumush /f echo done > C:\OEM\finished.txt