Windows System Configuration Notes

A personal summary of Windows system software configuration and solutions to common errors, to avoid searching every time.

System Configuration

1. Context Menu

Clean up desktop right-click menu

Computer\HKEY_CLASSES_ROOT\Directory\Background\shell

Clean up folder right-click menu

Computer\HKEY_CLASSES_ROOT\Directory\shell
Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers
Computer\HKEY_CLASSES_ROOT\Folder\shell
Computer\HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers

Configure file right-click menu

Computer\HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers

2. Remote Desktop

When using a Microsoft account as credentials to log in to Remote Desktop, you may always be prompted for an incorrect password. This may be because the computer did not update the Microsoft account password in time after it was changed. You can use your account privileges to run winver once to refresh the Microsoft account password.

runas /u:MicrosoftAccount\wenjie.xu.cn@outlook.com winver

3. Feature Interface

Allow virtual memory to be set on a non-system drive (fixes the error “Due to a page file configuration problem at computer startup, Windows created a temporary page file on your computer”)

reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" /v PagefileOnOsVolume /t REG_DWORD /d 0 /f

Make each File Explorer window run as a separate process to improve stability

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v SeparateProcess /t REG_DWORD /d 1 /f

Do not page drivers and kernel-mode system code to virtual memory (may solve some strange driver stability issues)

reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management" /v DisablePagingExecutive /t REG_D

If desktop, Explorer, etc. font scaling is abnormal and cannot be restored in settings, modify the registry to reset scaling

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]
"IconTitleWrap"="1"
"Shell Icon Size"="32"
"BorderWidth"="-15"
"CaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
  00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"CaptionHeight"="-330"
"CaptionWidth"="-330"
"IconFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
  00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"MenuFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00,\
  00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"MenuHeight"="-285"
"MenuWidth"="-285"
"MessageFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
  00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"ScrollHeight"="-255"
"ScrollWidth"="-255"
"SmCaptionFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,\
  00,00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SmCaptionHeight"="-330"
"SmCaptionWidth"="-330"
"StatusFont"=hex:f4,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,\
  00,00,00,01,00,00,05,00,53,00,65,00,67,00,6f,00,65,00,20,00,55,00,49,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"AppliedDPI"=dword:00000060
"PaddedBorderWidth"="-60"
"IconSpacing"="-1125"
"IconVerticalSpacing"="-1125"
"MinAnimate"="0"

Development Configuration

1. Scoop Package Manager

Scoop is the most convenient software (package) manager for me on Windows. It allows easy installation of software from the command line. Its features include:

  • No UAC popups
  • Prevents PATH pollution from installing many programs
  • Avoids unexpected side effects during installation and uninstallation
  • Automatically finds and installs dependencies
  • Automatically performs all extra setup steps for a runnable program

Note: When using Scoop, it keeps multiple versions of installed apps in their own folders for easy switching and rollback. For example, you can check the C:\Users\Xu\scoop\apps\oh-my-posh folder in File Explorer, where there should be several subfolders named by version. The currently active version is shown in the current directory, which is a symlink to the active version.

You can manually delete old version subfolders you no longer need. For example, if you see folders 7.68.0 and 7.69.1 but only want to keep the latest 7.69, go to C:\Users\Xu\scoop\apps\oh-my-posh and delete the old version folder (e.g., 7.68.0). Or use the command to automatically clean up unused old versions:

scoop cleanup oh-my-posh
# Clean up old versions for all apps
scoop cleanup *
# Clear package cache
scoop cache rm *

List of software installed with scoop:

Name                   Version            Source Updated             Info
----                   -------            ------ -------             ----
7zip                   24.09              main   2024-12-02 16:34:26
aria2                  1.37.0-1           main   2024-11-11 21:58:04
btop                   1.0.4              main   2024-07-17 21:29:16
btop-lhm               1.0.4              main   2024-07-17 21:29:25
draw.io                25.0.2             extras 2024-12-05 15:24:34
everything             1.4.1.1026         extras 2024-12-04 14:25:38
fastfetch              2.33.0             main   2024-12-28 23:17:29
fd                     10.2.0             main   2024-12-22 12:47:35
ffmpeg                 7.1                main   2024-10-20 18:21:52
fzf                    0.57.0             main   2024-12-22 12:47:39
geekuninstaller        1.5.2.165          extras 2024-12-03 16:21:50
gh                     2.64.0             main   2024-12-22 12:57:21
ghostscript            10.04.0            main   2024-12-22 12:49:34
git                    2.47.1             main   2024-12-02 16:46:01
imagemagick            7.1.1-43           main   2024-12-25 22:26:47
innounp                1.76               main   2024-11-14 10:58:02
jid                    0.7.6              main   2024-12-22 12:49:50
jq                     1.7.1              main   2024-12-22 12:47:28
mingw                  14.2.0-rt_v12-rev0 main   2024-12-05 15:37:08
mongodb                8.0.4              main   2024-12-08 12:22:01
mongodb-compass        1.45.0             extras 2024-12-05 15:24:52
mongodb-database-tools 100.10.0           main   2024-12-02 17:10:50
mongosh                2.3.7              extras 2024-12-22 12:57:28
motrix                 1.8.19             extras 2024-12-02 17:45:13
nodejs-lts             22.12.0            main   2024-12-05 15:25:03
notepad3               6.24.1221.1        extras 2024-12-22 12:59:44
office-tool-plus       10.19.8.0          extras 2024-12-22 12:59:49
oh-my-posh             24.17.1            main   2024-12-25 22:26:58
openjdk21              21.0.2-13          java   2024-12-05 15:46:33
pandoc                 3.6.1              main   2024-12-25 22:27:12
picgo                  2.3.1              extras 2024-12-02 17:32:48
pipx                   1.7.1              main   2024-12-13 20:38:34
pnpm                   9.15.2             main   2024-12-28 23:17:37
poppler                24.08.0-0          main   2024-12-22 12:47:32
r                      4.4.2              main   2024-12-02 16:39:04
registry-finder        2.59.0.0           extras 2024-12-04 14:15:35
ripgrep                14.1.1             main   2024-12-22 12:47:37
rstudio                2024.12.0-467      extras 2024-12-22 13:00:34
rtools                 4.4.6335.6327      main   2024-12-02 14:16:57
sudo                   0.2020.01.26       main   2024-09-30 13:16:29
switchhosts            4.2.0.6119         extras 2024-12-02 17:38:16
texstudio              4.8.5              extras 2024-12-14 16:06:48
thorium                128.0.6613.189     extras 2024-12-02 17:36:29
typst                  0.12.0             main   2024-12-05 15:34:13
vcredist2022           14.42.34433.0      extras 2024-12-02 16:56:57
wixtoolset             5.0.2              main   2024-11-14 10:57:52
zoxide                 0.9.6              main   2024-12-22 12:47:42

2. System Fonts

  • Powershell: ‘CaskaydiaMonoNerdFontMono’
  • VS Code: ‘CaskaydiaMonoNerdFontMono’ (English), ‘LXGW WenKai Mono’ (Chinese)
  • Office Word: ‘latinmodern-math’ (math formulas)。

3. Node.js

Mirror Source Manager nrm

  • nrm is an npm registry manager that helps users manage different registry sources more conveniently. Basic usage:
# Install nrm
npm install nrm -g
# List all configured registries
nrm ls
# Add a new registry
nrm add <registry-name> <registry-url>
# Remove a registry
nrm del <registry-name>
# Switch the current registry
nrm use <registry-name>
# Test the speed of all registries
nrm test

4. MongoDB

Installation

Use scoop to automatically install mongodb and related tools:

scoop bucket add main
scoop install main/mongodb
scoop install main/mongodb-database-tools

scoop bucket add extras
scoop install extras/mongosh
scoop install extras/mongodb-compass

Configuration

MongoDB installed via Scoop is not configured as a Windows service by default, but you can manually set MongoDB as a Windows service for auto-start on boot.

Check MongoDB installation path with Scoop:

scoop prefix mongodb

The mongod shim uses $dir\bin\mongod.cfg as the default config file. To use another config file, run $dir\bin\mongod.exe --config NEW_CONFIG_FILE, where NEW_CONFIG_FILE can be a modified copy of mongod.cfg stored elsewhere.

To start MongoDB manually, if data\db and data\log folders are not created (paths can be set in mongod.cfg), create them first:

<path>\bin\mongod.exe --dbpath "<path>\data\db" --logpath "<path>\data\log\mongo.log" --logappend

Open a new terminal to verify MongoDB is running:

mongosh

Register MongoDB as a Windows service:

sc.exe create MongoDB binPath= "<path>\bin\mongod.exe --service --config <path>\mongod.cfg" DisplayName= "MongoDB" start= "auto"
  • <path>: MongoDB installation path by Scoop.
  • --service: Run in service mode.
  • --config: Specify the MongoDB config file path (optional).

Start the MongoDB service. If successful, MongoDB will run automatically at system startup:

net start MongoDB

This page was automatically translated by generative AI and may contain inaccuracies or incomplete information. Feedback is welcome to help us improve.




    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • macOS System Configuration Notes
  • Practical Configuration Notes for Low-Performance Cloud Servers
  • Essay: Memories of the Old Home
  • Essay: The First Day of 2025, Some Thoughts
  • 2024 Work Summary