@@ -124,7 +124,7 @@ function Hide-RecentItems {
124124
125125# Function to minimize mouse hover time for item info
126126function Set-MouseHoverTimeForItemInfo {
127- reg add " HKCU\Control Panel\Desktop " / v " MouseHoverTime" / t REG_SZ / d " 20" / f
127+ reg add " HKCU\Control Panel\Mouse " / v " MouseHoverTime" / t REG_SZ / d " 20" / f
128128}
129129
130130# Function to configure File Explorer to open to This PC
@@ -162,10 +162,10 @@ function Disable-ShowEdgeTabsInAltTab {
162162# Function to disable AutoRun
163163function Disable-AutoRun {
164164 reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" / v " DisableAutoplay" / t REG_DWORD / d 1 / f
165- reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\CameraAlternate" / v " MSTakeNoAction" / t REG_NONE / d " " / f / f
166- reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\StorageOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f / f
167- reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\CameraAlternate\ShowPicturesOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f / f
168- reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\StorageOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f / f
165+ reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\CameraAlternate" / v " MSTakeNoAction" / t REG_NONE / d " " / f
166+ reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlersDefaultSelection\StorageOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f
167+ reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\CameraAlternate\ShowPicturesOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f
168+ reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\UserChosenExecuteHandlers\StorageOnArrival" / v " MSTakeNoAction" / t REG_NONE / d " " / f
169169}
170170
171171# Function to disable Aero Shake
@@ -180,7 +180,7 @@ function Disable-LowDiskSpaceChecks {
180180
181181# Function to disable menu hover delay
182182function Disable-MenuHoverDelay {
183- reg add " HKCU\Control Panel\Desktop" / v " MenuShowDelay" / t REG_SZ / d 0 / f
183+ reg add " HKCU\Control Panel\Desktop" / v " MenuShowDelay" / t REG_SZ / d " 0 " / f
184184}
185185
186186# Function to disable shared experiences
@@ -207,16 +207,16 @@ function Set-UnpinnedControlCenterItems {
207207
208208 if ((Get-WmiObject - Class Win32_OperatingSystem).Version -like " 10.0.19045" ){
209209 # Windows 10
210- reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Connect" / t REG_NONE / d " " / f / f
211- reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Location" / t REG_NONE / d " " / f / f
212- reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.ScreenClipping" / t REG_NONE / d " " / f / f
213- reg add " HKCU\Control Panel\Quick Actions\Control Center\QuickActionsStateCapture" / v " Toggles" / t REG_SZ / d " Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.AllSettings:false,Microsoft.QuickAction.Project:false" / f / f
210+ reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Connect" / t REG_NONE / d " " / f
211+ reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Location" / t REG_NONE / d " " / f
212+ reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.ScreenClipping" / t REG_NONE / d " " / f
213+ reg add " HKCU\Control Panel\Quick Actions\Control Center\QuickActionsStateCapture" / v " Toggles" / t REG_SZ / d " Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.AllSettings:false,Microsoft.QuickAction.Project:false" / f
214214 }
215215 else {
216216 # Windows 11
217- reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Cast" / t REG_NONE / d " " / f / f
218- reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.NearShare" / t REG_NONE / d " " / f / f
219- reg add " HKCU\Control Panel\Quick Actions\Control Center\QuickActionsStateCapture" / v " Toggles" / t REG_SZ / d " Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.Accessibility:false,Microsoft.QuickAction.ProjectL2:false" / f / f
217+ reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.Cast" / t REG_NONE / d " " / f
218+ reg add " HKCU\Control Panel\Quick Actions\Control Center\Unpinned" / v " Microsoft.QuickAction.NearShare" / t REG_NONE / d " " / f
219+ reg add " HKCU\Control Panel\Quick Actions\Control Center\QuickActionsStateCapture" / v " Toggles" / t REG_SZ / d " Toggles,Microsoft.QuickAction.BlueLightReduction:false,Microsoft.QuickAction.Accessibility:false,Microsoft.QuickAction.ProjectL2:false" / f
220220 }
221221
222222
@@ -268,7 +268,7 @@ function Hide-TabletMode {
268268# Function to disable Windows Chat
269269function Disable-WindowsChat {
270270 reg add " HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Chat" / v " ChatIcon" / t REG_DWORD / d 3 / f
271- reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" / v " TaskbarMn" / t REG_DWORD / d 0 / f
271+ reg add " HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" / v " TaskbarMn" / t REG_DWORD / d 0 / f
272272}
273273
274274# Function to add 'End task' to the taskbar
@@ -312,24 +312,24 @@ function Set-StartMenu {
312312 foreach ($userKey in (Get-RegUserPaths ).PsPath) {
313313 $default = if ($userKey -match ' AME_UserHive_Default' ) { $true }
314314 $sid = Split-Path $userKey - Leaf
315-
315+
316316 # Get Local AppData
317317 $appData = if ($default ) {
318318 Get-UserPath - Folder ' F1B32785-6FBA-4FCF-9D55-7B8E7F157091'
319319 } else {
320320 (Get-ItemProperty " $userKey \SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" - Name ' Local AppData' - EA 0 ).' Local AppData'
321321 }
322-
322+
323323 Write-Title " Configuring Start Menu for '$sid '..."
324324 if ([string ]::IsNullOrEmpty($appData ) -or ! (Test-Path $appData )) {
325325 Write-Error " Couldn't find AppData value for $sid !"
326326 } else {
327327 Write-Output " Copying default layout XML"
328328 Copy-Item - Path " $windir \AtlasModules\Other\Layout.xml" - Destination " $appdata \Microsoft\Windows\Shell\LayoutModification.xml" - Force
329-
329+
330330 if (! $default ) {
331331 Write-Output " Clearing Start Menu pinned items"
332-
332+
333333 $packages = Get-ChildItem - Path " $appdata \Packages" - Directory | Where-Object { $_.Name -match " Microsoft.Windows.StartMenuExperienceHost" }
334334 foreach ($package in $packages ) {
335335 $bins = Get-ChildItem - Path " $appdata \Packages\$ ( $package.Name ) \LocalState" - File | Where-Object { $_.Name -like " start*.bin" }
@@ -339,15 +339,15 @@ function Set-StartMenu {
339339 }
340340 }
341341 }
342-
342+
343343 if (! $default ) {
344344 Write-Output " Clearing default 'tilegrid'"
345- $tilegrid = Get-ChildItem - Path " $userKey \SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount" - Recurse | Where-Object { $_.Name -match " start.tilegrid" }
345+ $tilegrid = Get-ChildItem - Path " $userKey \SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount" - Recurse | Where-Object { $_.Name -match " start.tilegrid" }
346346 foreach ($key in $tilegrid ) {
347347 Remove-Item - Path $key.PSPath - Force
348348 }
349349 }
350-
350+
351351 Write-Output " Removing advertisements/stubs from Start Menu (23H2+)"
352352 Remove-ItemProperty - Path " $userKey \SOFTWARE\Microsoft\Windows\CurrentVersion\Start" - Name ' Config' - Force - EA 0
353353 }
0 commit comments