Published
- 3 min read
Windows 7: Quick and optimized install (Update)
Let’s speed up my original installation by using a powershell script instead of manually configuring windows.
1. Install
1.1 Win 7 SP1 integrated
So for WinXP, you would have slipstreamed the Service Packs. But screw that we got broadband. Download an integrated Iso from: http://www.mydigitallife.info/official-windows-7-sp1-iso-from-digital-river/
1.2 USB Install
Installing Windows 7 from a USB drive is typically faster than installing from a DVD. Follow these steps to install Windows 7 from a USB drive:
- Copy all files of the Windows 7 ISO to a USB drive (3GB free space required).
- Go to “Computer” -> “Manage” and navigate to Disk Management.
- Right-click on the partition where you copied the Windows 7 files and select “Mark Partition as Active.”
- Insert the USB drive into the PC to be set up and boot from the USB drive.
- Start the installation process.
Note: If you’re using a USB 3.0 port, you may need additional drivers to install from a USB drive.
1.3 Partitions
The primary purpose of creating partitions is to organize your files. You can create multiple partitions based on your preferred file organization. A best practice is to allocate at least 100GB of space for the operating system installation partition, to ensure sufficient space for installing additional programs.
Note: To improve performance, it is recommended to use multiple physical hard drives and configure the swap files accordingly. Placing the swap file on the same physical disk will not result in any performance boost.
2. Initial Settings via Powershell
- Open Powershell as Administrator
- Type the following command to set the execution policy:
Set-ExecutionPolicy Unrestricted
- Copy and modify the following code into a new text file:
#Enable Windows Classic Theme
Write-Host "Enabling Classic Theme" & $env:Systemroot'\\Resources\\Ease of Access Themes\\classic.theme'
#Set Explorer Settings
Write-Host "Configuring Explorer-Settings"
$explorerKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'
Set-ItemProperty $explorerKey NavPaneShowAllFolders 1
Set-ItemProperty $explorerKey NavPaneExpandToCurrentFolder 1
Set-ItemProperty $explorerKey Hidden 1
Set-ItemProperty $explorerKey HideFileExt 0
#Set Taskbar Settings
Write-Host "Taskbar Settings"
Set-ItemProperty $explorerKey TaskbarSmallIcons 1
Set-ItemProperty $explorerKey TaskbarGlomLevel 1
#Disable Customer Experience Improvement Program
Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\SQMClient\Windows' CEIPEnable 0
#Desktop Items
Write-Host "Display Icons"
$desktopKey = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons'
new-item -path $desktopKey
new-item -path $desktopKey\ClassicStartMenu
new-item -path $desktopKey\NewStartPanel
new-ItemProperty -path $desktopKey\ClassicStartMenu -name '{20D04FE0-3AEA-1069-A2D8-08002B30309D}' -value 0
new-ItemProperty -path $desktopKey\ClassicStartMenu -name '{59031a47-3f72-44a7-89c5-5595fe6b30ee}' -value 0
new-ItemProperty -path $desktopKey\ClassicStartMenu -name '{645FF040-5081-101B-9F08-00AA002F954E}' -value 0
new-ItemProperty -path $desktopKey\NewStartPanel -name '{20D04FE0-3AEA-1069-A2D8-08002B30309D}' -value 0
new-ItemProperty -path $desktopKey\NewStartPanel -name '{59031a47-3f72-44a7-89c5-5595fe6b30ee}' -value 0
new-ItemProperty -path $desktopKey\NewStartPanel -name '{645FF040-5081-101B-9F08-00AA002F954E}' -value 0
#Disable Remote Assistance
Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Remote Assistance' fAllowToGetHelp 0
#Restart Explorer
Stop-Process -processname explorer
#Disable UAC
Write-Host "Disabling User Account Control (UAC)"
Set-ItemProperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' EnableLUA 0
Write-Host "System needs to be rebooted"
#Disable Services
#Windows Search
(gwmi win32_service -filter "name='WSearch'").ChangeStartMode("Disabled")
#Windows Features
DISM /Online /Disable-Feature /FeatureName:WindowsGadgetPlatform
DISM /Online /Disable-Feature /FeatureName:TabletPCOC /NoRestart
DISM /Online /Disable-Feature /FeatureName:Printing-XPSServices-Features /NoRestart
DISM /Online /Disable-Feature /FeatureName:Xps-Foundation-Xps-Viewer /NoRestart
DISM /Online /Disable-Feature /FeatureName:Printing-Foundation-InternetPrinting-Client /NoRestart
DISM /Online /Disable-Feature /FeatureName:MediaCenter /NoRestart
DISM /Online /Disable-Feature /FeatureName:OpticalMediaDisc /NoRestart
DISM /Online /Disable-Feature /FeatureName:WindowsMediaPlayer /NoRestart
- Save as “windowsConfig.ps1” at C:\
- In Powershell execute C:\windowsConfig.ps1 (works only with full path)
- Useful Services Configuration Black Vipers Guide
3. Applications
3.1 Internet Explorer 9
To avoid downloading unnecessary updates, install Internet Explorer 9 before running Windows Update.
3.1 Ninite
Visit www.ninite.com to select from a range of free programs and download an automated installer.
That’s all folks!!!