This file contains the Windows configuration section of my Setup guide for a development machine on Windows. The introduction to this guide as well as its full Table of Contents can be found on the README.md file of this repository. The Table of Contents of this section is listed below.
For details on the Advanced Windows Settings, refer to the official Windows Advanced Settings documentation.
Developer Mode unlocks tools, settings, and features that are essential for many development tools. Enabling Developer Mode also allows you to create symbolic links without needing to run the Windows Command Prompt as an Administrator.
To enable Windows Developer Mode, follow the official instructions:
- Open Windows Settings;
- Go to System > Advanced, then scroll to the For developers section;
- Toggle the Developer Mode setting, at the top of the For developers section (Administrator priviliges will be required);
- Read the disclaimer. Click Yes to accept the change.
By default, Windows has a path limit of 260 characters. Modern development stacks (like Node.js with node_modules) often exceed this limit. You can remove this restriction via the System settings taking the following steps:
- Open Windows Settings;
- Go to System > Advanced, then scroll to the File Explorer section;
- Toggle the Enable long paths setting (Administrator priviliges will be required).
The path limit can also be removed executing, on a PowerShell console with Administrator privileges, the following command:
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -ForceKeeping the Laptop plugged after the battery is fully charged affect its health significantly, therefore its is recommended to keep the battery’s charge between 20% an 80%. On the Windows 10 Power Management we can setup an alarm/notification when the Laptop’s battery reaches a given low level. But there is no feature in Windows 10 to notify you when the battery reaches a given high level.
John Howard, Senior Program Manager in the Hyper-V team at Microsoft, created a script that gives an alert when the battery reaches 95%. I've adapted that script to give the alert when the the battery charges reaches 80% of it's capacity and I've stored on my OneDrive, in my dotfiles folder.
If a symlink to the folder %OneDriveCommercial%\dotfiles isn't yet created the Windows %USERPROFILE%, create executing the below command from the Windows Command Line to be able to easily reference the dotfiles folder.
mklink /J %USERPROFILE%\.dotfiles "%OneDriveCommercial%\dotfiles"Then, to execute the above mentioned script on every Windows start up, inside the folder %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup, create a shortcut pointing to the file %USERPROFILE%\.dotfiles\scripts\FullBattery.vbs.
To easily access the custom folders referred in the below sections, you can pin it to Quick Access. It can be done taking the following steps:
- Using the File Explorer, right-click on the new folder
- Select Pin to Quick Access
- The folder will appear in the left-hand sidebar of every File Explorer window
To customize the icon of the custom folders referred in the below sections, take the following steps:
- Using the File Explorer, right-click on the new folder
- Select Properties
- Select the "Customize" tab on the shown pop-up window
- Click the "Change Icon..." button
- Select the desired icon on the new pop-up window and then click the "OK" button
- Click the "Apply" button and then the "OK" button
My preferred installation folder for all the developer tools that I use on Windows is C:\dev. This folder needs to be created, using the below command in a Windows Command Prompt:
mkdir C:\devMy preferred installation folder for all code repositories is C:\code. This folder needs to be created, using the below command in a Windows Command Prompt:
mkdir C:\codeWindows has a habit of treating the Documents folder like a digital junk drawer, where every game, printer driver, and random piece of software feels entitled to drop its configuration files. It clutters the Documents folder and I really hate it.
Therefore, I prefer to store all my personal work files in a folder, under the Documents folder, named Workspace. This folder needs to be created, using the below command in a Windows Command Prompt:
mkdir %USERPROFILE%\Documents\Workspace