From ec67b6f4cf49a6536484a0919739d49b2669dd47 Mon Sep 17 00:00:00 2001 From: Caglar Yalcin Date: Sun, 19 May 2024 01:32:42 +0300 Subject: [PATCH] v4.3.1 - fixed some bugs --- resume.psm1 | 29 +++++++++++++++++++++++++++-- set.psm1 | 1 + 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/resume.psm1 b/resume.psm1 index 3bea8be..52b143b 100644 --- a/resume.psm1 +++ b/resume.psm1 @@ -1,6 +1,28 @@ +########## +#region Priority +########## + +Function Priority { + $ErrorActionPreference = 'SilentlyContinue' + New-PSDrive -PSProvider Registry -Name HKCU -Root HKEY_CURRENT_USER | Out-Null + New-PSDrive -PSProvider Registry -Name HKLM -Root HKEY_LOCAL_MACHINE | Out-Null + New-PSDrive -PSProvider Registry -Name HKU -Root HKEY_USERS | Out-Null + New-PSDrive -Name "HKCR" -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" | Out-Null +} + +Priority + +Function Silent { + $Global:ProgressPreference = 'SilentlyContinue' +} + +########## +#endregion Priority +########## + $wingetWarnings = @() Function InstallSoftwares { - Write-Host `n"---------Adjusting System Settings" -ForegroundColor Blue -BackgroundColor Gray + Write-Host "---------Adjusting System Settings" -ForegroundColor Blue -BackgroundColor Gray Write-Host "Chapter completed." Write-Host `n"---------Adjusting Privacy Settings" -ForegroundColor Blue -BackgroundColor Gray Write-Host "Chapter completed." @@ -1060,7 +1082,7 @@ Function UnusedApps { Silent #silently try { # Stop OneDrive and Explorer processes - taskkill /F /IM OneDrive.exe /IM explorer.exe /T *>$null + taskkill /f /im OneDrive.exe *>$null # Uninstall OneDrive $OneDriveSetupPaths = @( @@ -1257,6 +1279,9 @@ Function UnusedApps { Remove-Item $fullPath3 -ErrorAction Stop } } + + # Start Windows Explorer + Start-Process "explorer.exe" -NoNewWindow } catch { Write-Host "[WARNING] $_" -ForegroundColor Red -BackgroundColor Black diff --git a/set.psm1 b/set.psm1 index 1cf391a..05c131b 100644 --- a/set.psm1 +++ b/set.psm1 @@ -740,6 +740,7 @@ Function SystemSettings { Function SetDNS { Write-Host `n"Which DNS provider " -NoNewline Write-Host "do you want to use?" -ForegroundColor Yellow + Write-Host "Which DNS provider do you want to set? Write 1, 2 or 3." Write-Host `n"[1]" -NoNewline -BackgroundColor Black -ForegroundColor Yellow Write-Host " - Cloudflare" Write-Host "[2]" -NoNewline -BackgroundColor Black -ForegroundColor Yellow