16 lines
456 B
PowerShell
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..." |