mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 06:40:32 +00:00
[Windows] Add Windows 2025 code (#11037)
This commit is contained in:
@@ -27,18 +27,26 @@ if ($LASTEXITCODE -ne 0) {
|
||||
throw "Failed to copy HKCU\Software\Microsoft\VisualStudio to HKLM\DEFAULT\Software\Microsoft\VisualStudio"
|
||||
}
|
||||
|
||||
# disable TSVNCache.exe
|
||||
$registryKeyPath = 'HKCU:\Software\TortoiseSVN'
|
||||
if (-not(Test-Path -Path $registryKeyPath)) {
|
||||
New-Item -Path $registryKeyPath -ItemType Directory -Force
|
||||
}
|
||||
# TortoiseSVN not installed on Windows 2025 image due to Sysprep issues
|
||||
if (-not (Test-IsWin25)) {
|
||||
# disable TSVNCache.exe
|
||||
$registryKeyPath = 'HKCU:\Software\TortoiseSVN'
|
||||
if (-not(Test-Path -Path $registryKeyPath)) {
|
||||
New-Item -Path $registryKeyPath -ItemType Directory -Force
|
||||
}
|
||||
|
||||
New-ItemProperty -Path $registryKeyPath -Name CacheType -PropertyType DWORD -Value 0
|
||||
reg.exe copy HKCU\Software\TortoiseSVN HKLM\DEFAULT\Software\TortoiseSVN /s
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Failed to copy HKCU\Software\TortoiseSVN to HKLM\DEFAULT\Software\TortoiseSVN"
|
||||
New-ItemProperty -Path $registryKeyPath -Name CacheType -PropertyType DWORD -Value 0
|
||||
reg.exe copy HKCU\Software\TortoiseSVN HKLM\DEFAULT\Software\TortoiseSVN /s
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Failed to copy HKCU\Software\TortoiseSVN to HKLM\DEFAULT\Software\TortoiseSVN"
|
||||
}
|
||||
}
|
||||
|
||||
Dismount-RegistryHive "HKLM\DEFAULT"
|
||||
|
||||
# Remove the "installer" (var.install_user) user profile for Windows 2025 image
|
||||
if (Test-IsWin25) {
|
||||
Get-CimInstance -ClassName Win32_UserProfile | where-object {$_.LocalPath -match $env:INSTALL_USER} | Remove-CimInstance -Confirm:$false
|
||||
& net user $env:INSTALL_USER /DELETE
|
||||
}
|
||||
|
||||
Write-Host "Configure-User.ps1 - completed"
|
||||
|
||||
Reference in New Issue
Block a user