Skip to content

A set of scripts and notes I use on Windows to make life a little easier

Notifications You must be signed in to change notification settings

scadu/windows-desktop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

What's that?

This repository contains information regarding my Windows setup and some scripts and utils I use.


Tools, applications, languages

A short list of tools I use:

  • WinGet - Windows Package Manager. I use it to install most of the desktop apps.
  • Scoop - sometimes needed for developer tooling that's not available via winget.
  • NirSoft - Freeware utilities: password recovery, system utilities, desktop utilities

Scripts

PowerShell

Bootstrap

I use Set-DevMachineConfiguration to quickly setup new workstation. Not that I do that frequently, but it's handy.

⚠️ If you get an error you might need to change the execution policy (i.e. enable Powershell) with:

Set-ExecutionPolicy RemoteSigned -scope CurrentUser

Update-System

Update-DevEnvironment.ps1 updates installed programs via PatchMyPC and winget. Additionally, it also checks for available security and critical Windows updates with PSWindowsUpdate PowerShell module.

AutoHotkey

Use InstallAutoStart.ps1 to add AutoHotkey scripts to autostart for the current user.

This one is used to... change display resolution! Handy for gaming when wide screen might not be supported, or does not make much sense for certain titles.


Caveats

Symlinks and junctions

Some applications may require symlinks which require special privileges. These privileges can be assigned to the user by enabling Developer Mode, or updating the Local Security Policy.

Local Security Policy

Open Local Security Policy (secpol.msc) and go to Local Policies -> User Rights Assignment, select Create symbolic links, add your user to the list and reboot.

⚠️ I would recommend doing so only when absolutely required, e.g. the tooling you use doesn't support junctions

More detail about junctions on superuser.com.


Long paths

While MAX_PATH limitations have been removed in Windows 10, version 1607, the behavior remains opt-in.

More information can be found in Microsoft docs.

To enable long paths from PowerShell creating a registry key (run as admin):

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

High DPI

Windows scaling issues

Fix apps that appear blurry in Windows 10

Make older apps or programs compatible with Windows 10


Prevent applications from taking exclusive control of sound adapter

There are cases when applications takes control over sound adapter adjusting volume level automatically messing with our settings. Also, it means that only one application at a time can use your audio interface.

To prevent such behavior open Control Panel and go to Sound section, select your device and from Advanced tab uncheck Allow applications to take exclusive control of this device checkbox.


WSL

VHDX size

By default, VHD virtual hard drive used for storage by WSL distributions won't release unused space.

You may run wsl --export and wsl --import or use tools like wslcompact to automate that process. If you feel adventurous, you may use feature available in pre-release version of WSL - sparsevhd. To install pre-release version:

wsl --update; wsl --update --pre-release

Sample ~/.wslconfig:

# Settings apply across all Linux distros running on WSL 2
[wsl2]

# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
# pageReporting=false

# Turn off default connection to bind WSL 2 localhost to Windows localhost
# localhostforwarding=true

# Disables nested virtualization
# nestedVirtualization=false

# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
# debugConsole=true

# Enable experimental features
[experimental]
sparseVhd=true
# Automatically releases cached memory after detecting idle CPU usage.
# Set to gradual for slow release, and dropcache for instant release of cached memory.
autoMemoryReclaim=gradual

About

A set of scripts and notes I use on Windows to make life a little easier

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published