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