Fixed: Missing RegEdit [Win10]
Fixed missing RegEdit in Windows 10
This commit is contained in:
parent
c9a3e868e3
commit
ce3dba00e1
2 changed files with 67 additions and 27 deletions
|
@ -32,10 +32,67 @@ write-host " "
|
|||
}
|
||||
|
||||
|
||||
function Test-RegistryValue {
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$Path,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$Value
|
||||
)
|
||||
|
||||
try {
|
||||
$registryValue = Get-ItemProperty -Path $Path -ErrorAction Stop
|
||||
if ($registryValue.PSObject.Properties.Name -contains $Value) {
|
||||
return $true
|
||||
} else {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
function PreWin10 {
|
||||
if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People' -Value 'PeopleBand')) {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Value 0
|
||||
}
|
||||
if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace' -Value 'PenWorkspaceButtonDesiredVisibility')) {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace" -Name "PenWorkspaceButtonDesiredVisibility" -Value 0
|
||||
}
|
||||
if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\TabletTip\1.7' -Value 'TipbandDesiredVisibility')) {
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility" -Value 0
|
||||
}
|
||||
}
|
||||
|
||||
$windowsVersion = [System.Environment]::OSVersion.Version.Major
|
||||
|
||||
if ($windowsVersion -eq 10) {
|
||||
PreWin10
|
||||
} elseif ($windowsVersion -eq 11) {
|
||||
PreWin11
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function PreWin11 {
|
||||
# if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People' -Value 'PeopleBand')) {
|
||||
# Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Value 0
|
||||
# }
|
||||
# if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace' -Value 'PenWorkspaceButtonDesiredVisibility')) {
|
||||
# Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace" -Name "PenWorkspaceButtonDesiredVisibility" -Value 0
|
||||
# }
|
||||
# if (-Not (Test-RegistryValue -Path 'HKCU:\SOFTWARE\Microsoft\TabletTip\1.7' -Value 'TipbandDesiredVisibility')) {
|
||||
# Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility" -Value 0
|
||||
# }
|
||||
|
||||
write-host "=------------------------------="
|
||||
write-host " Windows 11 is still in WIP "
|
||||
write-host "=------------------------------="
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -440,40 +497,24 @@ if($value8.ShowCortanaButton -eq 0)
|
|||
$WPFUnpin_People.Add_Checked({RemPeople})
|
||||
$WPFUnpin_People.Add_UnChecked({RemPeople})
|
||||
$value9 = Get-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand"
|
||||
if ($value9) {
|
||||
if ($value9.PeopleBand -eq 0) {
|
||||
if ($value9.PeopleBand -eq 0) {
|
||||
$WPFUnpin_People.IsChecked = $true
|
||||
}
|
||||
}
|
||||
else {
|
||||
# If the registry value doesn't exist, create it with a value of 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Value 0
|
||||
}
|
||||
|
||||
$WPFUnpin_Ink_Workspace.Add_Checked({RemInkWS})
|
||||
$WPFUnpin_Ink_Workspace.Add_UnChecked({RemInkWS})
|
||||
$value10 = Get-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\" -Name "PenWorkspaceButtonDesiredVisibility"
|
||||
if ($value10) {
|
||||
if ($value10.PenWorkspaceButtonDesiredVisibility -eq 0) {
|
||||
if ($value10.PenWorkspaceButtonDesiredVisibility -eq 0) {
|
||||
$WPFUnpin_Ink_Workspace.IsChecked = $true
|
||||
}
|
||||
}
|
||||
else {
|
||||
# If the registry value doesn't exist, create it with a value of 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace" -Name "PenWorkspaceButtonDesiredVisibility" -Value 0
|
||||
}
|
||||
|
||||
|
||||
$WPFUnpin_Touch_Keyboard.Add_Checked({RemTouchKey})
|
||||
$WPFUnpin_Touch_Keyboard.Add_UnChecked({RemTouchKey})
|
||||
$value11 = Get-ItemProperty -path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility"
|
||||
if ($value11) {
|
||||
if ($value11.TipbandDesiredVisibility -eq 0) {
|
||||
if($value11.TipbandDesiredVisibility -eq 0)
|
||||
{
|
||||
$WPFUnpin_Touch_Keyboard.IsChecked = $true
|
||||
}
|
||||
}
|
||||
else {
|
||||
# If the registry value doesn't exist, create it with a value of 0
|
||||
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\TabletTip\1.7" -Name "TipbandDesiredVisibility" -Value 0
|
||||
}
|
||||
|
||||
|
||||
|
@ -753,8 +794,7 @@ $WPFWin10RC.Visibility = "Hidden"
|
|||
|
||||
|
||||
|
||||
|
||||
$windowsVersion = [System.Environment]::OSVersion.Version.Major
|
||||
OlaYZen
|
||||
|
||||
if ($windowsVersion -eq 10) {
|
||||
Win10
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<Grid Background="White">
|
||||
<Label x:Name="Label5" Content="Version" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontSize="30" FontWeight="Bold" Grid.ColumnSpan="2"/>
|
||||
<Label x:Name="OSLabel" Content="Windows Detector" HorizontalAlignment="Left" Margin="10,228,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="ExplainingLabel_Copy1" Content="Version 1.1.7 (Build 1171.03)" HorizontalAlignment="Right" Margin="0,228,10,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="ExplainingLabel_Copy1" Content="Version 1.1.7 (Build 1171.04)" HorizontalAlignment="Right" Margin="0,228,10,0" VerticalAlignment="Top"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
|
Loading…
Reference in a new issue