diff --git a/configwinpc.ps1 b/configwinpc.ps1 index f6b69bf..867646c 100644 --- a/configwinpc.ps1 +++ b/configwinpc.ps1 @@ -156,12 +156,6 @@ Write-Host -ForegroundColor Yellow ">>> Disable Notifications on Lock Screen <<< New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings" -Name "NOC_GLOBAL_SETTING_ALLOW_TOASTS_ABOVE_LOCK" -Value "0" -Type DWORD -Force | Out-Null New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "LockScreenToastEnabled" -Value "0" -Type DWORD -Force | Out-Null -# Create a temporary folder for export -$exportPath = "C:\temp" -if (-Not (Test-Path $exportPath)) { - New-Item -ItemType Directory -Path $exportPath | Out-Null -} - ########################################################################################## # # # Control Panel # @@ -204,6 +198,12 @@ Write-Host "" # Export the registry keys Write-Host -ForegroundColor DarkGray ">>> Exporting registry settings... <<<" +# Create a temporary folder for export +$exportPath = "C:\temp" +if (-Not (Test-Path $exportPath)) { + New-Item -ItemType Directory -Path $exportPath | Out-Null +} + reg export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "$exportPath\TaskbarSettings.reg" /y | Out-Null reg export "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "$exportPath\SearchSettings.reg" /y | Out-Null