Icon Size Registry Tweak

You have no choice, when you change the size of the icons the grid changes automatically.

You can manually set the spacing between icons very easily :

rightclick desktop and go to "Personalization" page>Window color>advanced

from the dropdown box, you will see :

spacing between icons (horiz)
spacing between icon (vert)

From there you can manipulate the spacing to your liking.
 

My Computer My Computer

OS
win7 x64
@EricT
Thanks for the info

If've written an Batch script which does the change:

Code:
@echo off 
taskkill /im explorer.exe /f 
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop" /v IconSize /t REG_DWORD /d 00000032 /f 
"%windir%\explorer.exe"
Strange is, that after a fresh installation and first login with a user the script doesn't works. You've first to logoff and than login again?! Otherwise there are no standard values in the key.

Would be very happy if someone could write an shell API script
 
Last edited:

My Computer My Computer

OS
Windows 7
Hello, I too would love to be able to change the icon size in Windows 7 by the registry or script. Reason: We have over 2000 systems and having the ability to control ever little detail is nice. I still need to look at Group Policy. I have tried everything in this post and nothing works.
 

My Computer My Computer

OS
Windows 7
Hello from France.
Thanks to this post informations, I've writen a little vbs script that autohide the taskbar and set the destop icons to small size.
How it works?
The script write an other script called "BarreDesTaches.vbs" in the temporary folder of Windows, add a registry entry in RunOnce to launch it on the next LogOn, and automatically LogOff.
Hope you enjoy!
L.

http://lamemelongueurdonde.com/blog/wp-content/uploads/2010/08/MasquerBarreDesTaches.rar
 

My Computer My Computer

OS
Windows 7
Seems OK.

Here is the code for the script (remember that the author is French):

Code:
Option Explicit
'-------------------------------------------------------------------------------------------
'Récupération de l'emplacement de Windows
'-------------------------------------------------------------------------------------------
Dim oShell
Set oShell = CreateObject("Wscript.Shell")
Dim strWinDir
strWinDir = oShell.ExpandEnvironmentStrings("%SystemRoot%") 
'-------------------------------------------------------------------------------------------
'Ecriture du fichier BarreDesTaches.vbs dans le répertoire temporaire
'-------------------------------------------------------------------------------------------
Dim objFSO, objTextFile
Dim strDirectory, strFile, strText
strDirectory = strWinDir & "\TEMP"
strFile = "\BarreDesTaches.vbs"
strText = "const HKCU = &H80000001" _
& VbCRLf & _
"dim oWMIReg"_
& VbCrLf & _
"set oWMIReg = GetObject(""winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv"")"_
& VbCrLf & _
"dim iValueArray()"_
& VbCrLf & _
"oWMIReg.GetBinaryValue HKCU, ""Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"", ""Settings"", iValueArray"_
& VbCrLf & _
"iValueArray(8) = 3"_
& VbCrLf & _
"oWMIReg.SetBinaryValue HKCU, ""Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"", ""Settings"", iValueArray"_
& VbCrLf & _
"oWMIReg.SetDWORDValue HKCU, ""Software\Microsoft\Windows\Shell\Bags\1\Desktop"", ""IconSize"", 30"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 2, True)
objTextFile.WriteLine(strText)
objTextFile.Close

'-------------------------------------------------------------------------------------------
'Lancement du fichier BarreDesTaches.vbs au prochain LogOn via Runeonce
'-------------------------------------------------------------------------------------------
const HKey_LOCAL_MACHINE = &H80000002
dim oWMIReg
set oWMIReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") 
oWMIReg.SetStringValue HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\RunOnce", "BarreDesTaches", strWinDir&"\Temp\BarreDesTaches.vbs"
'-------------------------------------------------------------------------------------------
'LogOff
'-------------------------------------------------------------------------------------------
dim objExec
Set objExec = oShell.Exec("logoff")
WScript.Quit
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dwarf Dwf/11/2012 r09/2013
OS
Windows 8.1 Pro RTM x64
CPU
Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.4GHz)
Motherboard
ASRock Z77 Extreme4-M
Memory
4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB)
Graphics Card(s)
MSI GeForce GTX770 Gaming OC 2GB
Sound Card
Realtek High Definition on board solution (ALC 898)
Monitor(s) Displays
ViewSonic VA1912w Widescreen (VGA)
Screen Resolution
1440x900
Hard Drives
OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0
PSU
XFX Pro Series 850W Semi-Modular
Case
Gigabyte IF233
Cooling
1 x 120mm Front Inlet 1 x 120mm Rear Exhaust
Keyboard
Microsoft Comfort Curve Keyboard 3000 (USB)
Mouse
Microsoft Comfort Mouse 3000 for Business (USB)
Internet Speed
NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2)
Antivirus
Avast! 8.0.1497
Browser
IE 11
Other Info
Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
WEI Score: 8.1/8.1/8.5/8.5/8.25
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter)
modify script to not hide taskbar?

This is a nifty script, but I was wondering what lines I would need to delete in order to affect only the desktop icon size (as that is the specific purpose of this thread), leaving the taskbar alone since I already have it configured exactly the way I want, and I definitely do not want it auto-hidden.

I am comfortable with DOS batch files but have no experience with VB or even WSH, so am not sure how to proceed. Thanks much for any guidance.
Code:
Option Explicit
'-------------------------------------------------------------------------------------------
'Récupération de l'emplacement de Windows
'-------------------------------------------------------------------------------------------
Dim oShell
Set oShell = CreateObject("Wscript.Shell")
Dim strWinDir
strWinDir = oShell.ExpandEnvironmentStrings("%SystemRoot%") 
'-------------------------------------------------------------------------------------------
'Ecriture du fichier BarreDesTaches.vbs dans le répertoire temporaire
'-------------------------------------------------------------------------------------------
Dim objFSO, objTextFile
Dim strDirectory, strFile, strText
strDirectory = strWinDir & "\TEMP"
strFile = "\BarreDesTaches.vbs"
strText = "const HKCU = &H80000001" _
& VbCRLf & _
"dim oWMIReg"_
& VbCrLf & _
"set oWMIReg = GetObject(""winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv"")"_
& VbCrLf & _
"dim iValueArray()"_
& VbCrLf & _
"oWMIReg.GetBinaryValue HKCU, ""Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"", ""Settings"", iValueArray"_
& VbCrLf & _
"iValueArray(8) = 3"_
& VbCrLf & _
"oWMIReg.SetBinaryValue HKCU, ""Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2"", ""Settings"", iValueArray"_
& VbCrLf & _
"oWMIReg.SetDWORDValue HKCU, ""Software\Microsoft\Windows\Shell\Bags\1\Desktop"", ""IconSize"", 30"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, 2, True)
objTextFile.WriteLine(strText)
objTextFile.Close

'-------------------------------------------------------------------------------------------
'Lancement du fichier BarreDesTaches.vbs au prochain LogOn via Runeonce
'-------------------------------------------------------------------------------------------
const HKey_LOCAL_MACHINE = &H80000002
dim oWMIReg
set oWMIReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") 
oWMIReg.SetStringValue HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\RunOnce", "BarreDesTaches", strWinDir&"\Temp\BarreDesTaches.vbs"
'-------------------------------------------------------------------------------------------
'LogOff
'-------------------------------------------------------------------------------------------
dim objExec
Set objExec = oShell.Exec("logoff")
WScript.Quit
[/QUOTE]
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Homebrew build
OS
7 Pro x64 (desktop), 7 Ultimate x86 (laptop)
CPU
i7 3770K (no OC)
Motherboard
ASRock z77 Extreme 4
Memory
8G (2x4)
Graphics Card(s)
n/a
PSU
Corsair TX650M
Case
generic Enlight
Cooling
air front-back 92mm push-pulls; side 120mm push, 80mm pull
Browser
FF only
Back
Top