From ca5913e41b1ac0702d58a191d958154f33cca8e1 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 16 Jul 2023 12:55:23 +0200 Subject: [PATCH] Show file extensions by default --- scripts/Windows/Config/Explorer/Install.ps1 | 12 ++++++++++++ scripts/Windows/OS/Install.ps1 | 1 + 2 files changed, 13 insertions(+) create mode 100644 scripts/Windows/Config/Explorer/Install.ps1 diff --git a/scripts/Windows/Config/Explorer/Install.ps1 b/scripts/Windows/Config/Explorer/Install.ps1 new file mode 100644 index 00000000..258a95c2 --- /dev/null +++ b/scripts/Windows/Config/Explorer/Install.ps1 @@ -0,0 +1,12 @@ +#!/bin/pwsh +param($context) +Write-Host "Configuring file explorer"; + +$action = { + param([Microsoft.Win32.RegistryKey] $userKey) + + $path = $userKey.PSPath; + Set-ItemProperty "$path\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 0 -Type "DWord"; +} + +$context.ProcessDefaultUserKey($action); diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index c2d1e098..a89b510f 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -10,6 +10,7 @@ function Invoke-WindowsInstallation([Context] $context) Write-Host "Starting Installation and Restoration of Windows"; . "$PSScriptRoot/../Scripts/Prerequisites.ps1"; Update-WindowsInstallation $context; + . "$PSScriptRoot/../Config/Explorer/Install.ps1"; if (-not $context.Get("SoftwarePrerequisitesInstalled")) { Write-Host "Installing prerequisites for installing software";