2
0
tcse-deploy/Patches/Windows/Import-Registry-Changes.ps1
2024-12-20 13:27:30 -06:00

16 lines
456 B
PowerShell

# Define the directory containing the .reg files
$regFilesDir = "C:\Scripts\Patches\Registry"
# Get an array of all .reg files in the directory
$regFiles = Get-ChildItem -Path $regFilesDir -Filter "*.reg"
# Loop through each .reg file and import it
foreach ($regFile in $regFiles) {
reg import $regFile.FullName
}
# Restart File Explorer
Taskkill /F /IM explorer.exe
Start-Process explorer.exe
Write-Host "Registry changes successfully imported..."