Skip to content

Instantly share code, notes, and snippets.

@yzorg
Created February 10, 2023 17:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yzorg/48a49d8c34b217746388912b30ec3139 to your computer and use it in GitHub Desktop.
Save yzorg/48a49d8c34b217746388912b30ec3139 to your computer and use it in GitHub Desktop.
Make Win10/Win11 window borders a bit easier to resize. Key is from https://superuser.com/a/1767917/31557
# reg key is from https://superuser.com/a/1767917/31557
$BorderWidthValue = -100
#$BorderWidthValue = -200 # uncomment this to make them really wide, @yzorg likes -100 so kept that default
# make a backup of current value
pushd ~\Documents
reg export 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics' .\registry-WindowMetrics-old.reg
pushd ('HKEY_CURRENT_USER\Control Panel\Desktop' -replace 'HKEY_CURRENT_USER','HKCU:')
Set-ItemProperty .\WindowMetrics\ -Name BorderWidth -Value $BorderWidthValue
# change current directory back to main drive
popd
# save a copy of new value, little easier to change back-and-forth if switching or trying different values
reg export 'HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics' .\registry-WindowMetrics-new.reg
# go back to whatever directory you were using before you started this script/snippet
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment