Skip to content

Instantly share code, notes, and snippets.

@hoang-himself
Last active September 14, 2023 14:51
Show Gist options
  • Save hoang-himself/996b22c7ec2bb07ab3427de1941d0152 to your computer and use it in GitHub Desktop.
Save hoang-himself/996b22c7ec2bb07ab3427de1941d0152 to your computer and use it in GitHub Desktop.
Registry tweaks

Registry tweaks

Various tweaks related to the Windows Registry

#Requires -PSEdition Core -RunAsAdministrator
New-Item -ItemType 'ExpandString' -Path 'HKCU:\Software\Mozilla\NativeMessagingHosts\com.8bit.bitwarden' `
-Value '%APPDATA%\Bitwarden\browsers\firefox.json' -Force
New-Item -ItemType 'ExpandString' -Path 'HKCU:\Software\Google\Chrome\NativeMessagingHosts\com.8bit.bitwarden' `
-Value '%APPDATA%\Bitwarden\browsers\chrome.json' -Force
New-Item -ItemType 'ExpandString' -Path 'HKCU:\Software\Microsoft\Edge\NativeMessagingHosts\com.8bit.bitwarden' `
-Value '%APPDATA%\Bitwarden\browsers\chrome.json' -Force
# Additional configuration is required in Bitwarden Desktop
# 1. Disable browser integration
# 2. Completely exit Bitwarden
# 3. Start Bitwarden
# 4. Enable browser integration
#Requires -PSEdition Core -RunAsAdministrator
# Right click on files
New-Item -Path 'HKCU:\Software\Classes\*\shell\VSCodeInsiders' `
-Value 'Open w&ith Code Insiders' -Force
New-ItemProperty -Path 'HKCU:\Software\Classes\*\shell\VSCodeInsiders' -PropertyType 'ExpandString' `
-Name 'Icon' -Value '%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe' -Force
New-Item -Path 'HKCU:\Software\Classes\*\shell\VSCodeInsiders\command' -ItemType 'ExpandString' `
-Value '"%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe" "%1"' -Force
# Right click on folders
New-Item -Path 'HKCU:\Software\Classes\Directory\shell\VSCodeInsiders' `
-Value 'Open w&ith Code Insiders' -Force
New-ItemProperty -Path 'HKCU:\Software\Classes\Directory\shell\VSCodeInsiders' -PropertyType 'ExpandString' `
-Name 'Icon' -Value '%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe' -Force
New-Item -Path 'HKCU:\Software\Classes\Directory\shell\VSCodeInsiders\command' -ItemType 'ExpandString' `
-Value '"%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe" "%V"' -Force
# Right click in folders
New-Item -Path 'HKCU:\Software\Classes\Directory\Background\shell\VSCodeInsiders' `
-Value 'Open w&ith Code Insiders' -Force
New-ItemProperty -Path 'HKCU:\Software\Classes\Directory\Background\shell\VSCodeInsiders' -PropertyType 'ExpandString' `
-Name 'Icon' -Value '%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe' -Force
New-Item -Path 'HKCU:\Software\Classes\Directory\Background\shell\VSCodeInsiders\command' -ItemType 'ExpandString' `
-Value '"%LOCALAPPDATA%\Programs\Microsoft VS Code Insiders\Code - Insiders.exe" "%V"' -Force
#Requires -PSEdition Core -RunAsAdministrator
# https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/enable-verbose-startup-shutdown-logon-logoff-status-messages
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Force `
-Name 'VerboseStatus' -Value 1 -PropertyType 'DWord'
New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' -Force `
-Name 'DisableStatusMessages' -Value 0 -PropertyType 'DWord'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment