From a50d7b432d4f6cd1b86c516afab7f41a9940b824 Mon Sep 17 00:00:00 2001 From: ilia-shipitsin <125650415+ilia-shipitsin@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:26:22 +0200 Subject: [PATCH] [windows] reverting SQL LocalDB warmup (#8505) --- images/win/scripts/Installers/Warmup-User.ps1 | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/images/win/scripts/Installers/Warmup-User.ps1 b/images/win/scripts/Installers/Warmup-User.ps1 index fffb1fd7c..3ffcbb808 100644 --- a/images/win/scripts/Installers/Warmup-User.ps1 +++ b/images/win/scripts/Installers/Warmup-User.ps1 @@ -29,22 +29,5 @@ if (-not(Test-Path -Path $registryKeyPath)) { New-ItemProperty -Path $RegistryKeyPath -Name CacheType -PropertyType DWORD -Value 0 reg.exe copy HKCU\Software\TortoiseSVN HKLM\DEFAULT\Software\TortoiseSVN /s - -# warmup SQL LocalDB -# https://github.com/actions/runner-images/issues/8164 - -sqllocaldb create MSSQLLocalDB - -$localDBInstance = Get-ChildItem -Path 'HKCU:\Software\Microsoft\Microsoft SQL Server\UserInstances' -$instanceName = ($localDBInstance.Name).Split('\').where({ $true },'Last') -$instancePath = 'HKCU:\Software\Microsoft\Microsoft SQL Server\UserInstances\' + $instanceName -$dataDirectory = (Get-ItemProperty -Path $instancePath -Name 'DataDirectory').DataDirectory -$localDBPath = 'C:\LocalDB' -New-Item -ItemType 'Directory' -Path $localDBPath -Move-Item -Path "$dataDirectory\*" -Destination $localDBPath -Set-ItemProperty -Path $instancePath -Name 'DataDirectory' -Value $localDBPath - -reg.exe copy 'HKCU\Software\Microsoft\Microsoft SQL Server' 'HKLM\DEFAULT\Software\Microsoft\Microsoft SQL Server' /s - reg.exe unload HKLM\DEFAULT Write-Host "Warmup-User.ps1 - completed"