Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit e5636b0

Browse files
committed
Add "Set PowerShell/Command prompt in WinX menu", closes #309
1 parent b76ef02 commit e5636b0

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Default.preset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ DisableSearchAppInStore # EnableSearchAppInStore
126126
DisableNewAppPrompt # EnableNewAppPrompt
127127
# HideRecentlyAddedApps # ShowRecentlyAddedApps
128128
# HideMostUsedApps # ShowMostUsedApps
129+
# SetWinXMenuPowerShell # SetWinXMenuCmd
129130
# SetControlPanelSmallIcons # SetControlPanelLargeIcons # SetControlPanelCategories
130131
DisableShortcutInName # EnableShortcutInName
131132
# HideShortcutArrow # ShowShortcutArrow

Win10.psm1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,26 @@ Function ShowMostUsedApps {
19011901
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoStartMenuMFUprogramsList" -ErrorAction SilentlyContinue
19021902
}
19031903

1904+
# Set PowerShell instead of Command prompt in Start Button context menu (Win+X) - Default since 1703
1905+
Function SetWinXMenuPowerShell {
1906+
Write-Output "Setting PowerShell instead of Command prompt in WinX menu..."
1907+
If ([System.Environment]::OSVersion.Version.Build -le 14393) {
1908+
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DontUsePowerShellOnWinX" -Type DWord -Value 0
1909+
} Else {
1910+
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DontUsePowerShellOnWinX" -ErrorAction SilentlyContinue
1911+
}
1912+
}
1913+
1914+
# Set Command prompt instead of PowerShell in Start Button context menu (Win+X) - Default in 1507 - 1607
1915+
Function SetWinXMenuCmd {
1916+
Write-Output "Setting Command prompt instead of PowerShell in WinX menu..."
1917+
If ([System.Environment]::OSVersion.Version.Build -le 14393) {
1918+
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DontUsePowerShellOnWinX" -ErrorAction SilentlyContinue
1919+
} Else {
1920+
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DontUsePowerShellOnWinX" -Type DWord -Value 1
1921+
}
1922+
}
1923+
19041924
# Set Control Panel view to Small icons (Classic)
19051925
Function SetControlPanelSmallIcons {
19061926
Write-Output "Setting Control Panel view to small icons..."

0 commit comments

Comments
 (0)