Change Windows Default Install Path to D Drive with a Batch Script
Category: Productivity | Date: 2026-03-05
Is your C drive constantly filling up? Learn how a simple batch script can redirect software installations to your D drive, solving low disk space issues for your small business once and for all.
Article Summary
Last updated: June 2026 | Written by IT SUPPORTKING Technical Team Batch Script Solution Most Windows software defaults to C:\Program Files during installation. For office computers with only 256GB SSDs, the C drive quickly fills up with system updates and cache, slowing down the system or even causing crashes. The Fix Create a .bat file and run it as Administrator: @echo off reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion" /v "ProgramFilesDir" /t REG_SZ /d "D:\Program Files" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion" /v "ProgramFilesDir (x86)" /t REG_SZ /d "D:\Program Files (x86)" /f echo Default path changed to D drive! Please restart your computer. pause Important: Modifying the registry carries risks. Always back up your data first. ...
Read Full Article