Solved CHange Desktop icon size via registry

Butters

Member
Member
VIP
Local time
4:23 AM
Messages
195
Hello everyone. I need to find where the Desktop icon size is stored in the registry. I already looked into this:

HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics - Shell Icon Size
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop - IconSize

But neither of these seem to change anything. Even if I change the icon size by using right click or the mouse scroll wheel, these values don't change at all. So where is this data really stored? Thanks in advance.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
Hi Butters, right click empty desktop &:-

RR.jpg
 

My Computer My Computer

Computer Manufacturer/Model Number
Look in my Signature.
OS
Win7 H.Prem. 32bit+SP1
I already know how to do that. The thing is I need the location of where this is stored in the registry.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
Hello everyone. I need to find where the Desktop icon size is stored in the registry. I already looked into this:

HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics - Shell Icon Size
and
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop - IconSize

But neither of these seem to change anything. Even if I change the icon size by using right click [on the desktop] or the mouse scroll wheel, these values don't change at all. So where is this data really stored? Thanks in advance.

I already know how to do that. The thing is I need the location of where this is stored in the registry.
Be gentle. Roderunner was attempting to help. We voluntarily read 100s of posts each day and at times we miss stuff or interpret it the wrong way.

It would also help us to help you if you would tell us why you want to know this info. That said, the icon size value is stored in one of the areas that you mentioned, but...
...it does not get changed when you think it does
...the number 1 in that registry path will not always be number 1
...the info can get corrupted.
(When that happens, Explorer will ignore whatever is in that "bags" tree.)

icon size.png

Process Monitor is your friend :-)

Explorer usually does not write certain info to the registry until certain other things happen. When you change the desktop icon size via right click > view > xxxxxxx, Explorer actually writes the old/current value to the shell bags tree. That is why you did not see the registry value change. If you select the desktop and press F5 (refresh), then you should see that registry value update to reflect the actual icon size. It will also change if Explorer is correctly leaving RAM during a system restart of shutdown. Maybe a log off too, I've not checked.

Again, it would help us to help you if we knew what you were attempting to do. If you want to change the desktop icon size programmatically, then you might run into the opposite problem: you can change that registry value, but the desktop icon sizes might not change until you tell explorer to refresh the desktop. I think that there are other ways to get Explorer's attention other than refresh - but let's save that until we learn what in the world you are doing.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
Thanks for the help. Sorry if I sounded harsh at all, I wasn't trying to. Here's why I need to do this:
I'm working with many computers, and we want to have similar settings across all the machines. Unfortunately we can't access remote desktop at the moment, so we have to go to each computer and import certain registry settings. The reason I want this information is because I would like to simply import one registry file (which also contains other settings we want changed) and be done. I don't want to right-click on each desktop to get a universal icon size, especially when I'm already importing a registry file with settings.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
I did a tiny test and it seems that using a reg file might be problematic. If you set the value for IconSize using a reg file, the computer will just set it right back once you log off, restart or shut down the computer.

Also, how would you prevent users from changing the settings?
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
I did a tiny test and it seems that using a reg file might be problematic. If you set the value for IconSize using a reg file, the computer will just set it right back once you log off, restart or shut down the computer.
That's what I was afraid of. Based on what you described, I guess that would mean that the icon size is stored in memory and is written to the registry after a desktop refresh or the user actually changing the settings with a right click. Now what I don't understand about that is that even if I change the icon size with a right click and log off, the registry value is still 48 no matter what. I would think the value of the current icon size would be written to the registry after all that. So I guess this means I'll need to right click on each desktop then?

Also, how would you prevent users from changing the settings?
That's another issue we're facing. I'm working at a high school, and we aren't really alowed to change anyhing like GPO. That's handled by the school district office because the domain we use is actually used by the entire school district. We just want to do what we can for now before we are able to talk to the district's IT. So this is more temporarry, just so users won't get confused for now. In the meantime, we really can't prevent users from changing the settings, but going to a computer and importing a reg file really isn't hard if a user does change some settings.
 
Last edited:

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
>I guess that would mean that the icon size is stored in memory...
Probably.

>...and is written to the registry after a desktop refresh
Yes.

>...or the user actually changing the settings with a right click.
No.

In the videos below, a script puts a tooltip in the middle of the desktop to show the decimal value of IconSize. The script reads/displays the value every half second so that you can see what user actions update that registry value. Notice that actually changing the settings with a right click does NOT cause the new icon size value to be written to the registry.


best viewed in the full screen mode and at 720p



As mentioned, a normal reg file does no good.




>...even if I change the icon size with a right click and log off,
>the registry value is still 48 no matter what.
Logging off should cause the current icon size value to be written to the registry.

 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
Wow, thanks for those videos, and nice script too. I did a little experimenting myself, and I think I figured out how it works. The icon size is stored in explorer.exe's memory, and is written to the registry when explorer.exe is closed (which is why it didn't change after a log off). When explorer is started again, it looks in the registry for which size icons to display. So the solution I found was to write a .bat file to kill explorer.exe, write the icon size value to the registry, and then start explorer.exe again. I tested this, and sure enough it works. Here's the commands I used in the .bat file:

@echo off
taskkill /f /im explorer.exe
reg add "HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop" /v "IconSize" /t REG_DWORD /d 48 /f
explorer.exe


Thanks again for your help.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell Inspiron 15 7000 Series
OS
Windows 7 Professional x64
CPU
Intel Core i7-4510U CPU
Memory
8 GB RAM
Graphics Card(s)
Intel(R) HD Graphics (I so wish I could upgrade this)
Screen Resolution
1920x1080
Keyboard
Laptop keyboard
Mouse
Microsoft Mouse
Internet Speed
Nothing to write home about
Antivirus
Malwarebytes Anti Malware
Browser
Pale Moon (Firefox fork)
Other Info
My primary laptop has Windows 10 on it, and my shared desktop (which is actually a laptop being used as a desktop) has Windows 7 Professional on it. I still use both, but I would say I use my laptop a bit more now.
I had considered the solution of killing Explorer, but was hesitant to suggest it since there can be some things in the notification area that do not restart until the computer is restarted. These are usually 3rd party apps.

Glad that you found something that works for you :-)
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Employer provided Dell Latitude
OS
W7 Pro SP1 64bit
CPU
i7
Memory
8GB
Graphics Card(s)
Intel HD Graphics
Hard Drives
crappy SSD
Antivirus
Employer mandated Symantec Endpoint Protection
Browser
Pale Moon 64bit, IE11 64bit & Chrome 64bit
The script that you provided does set the Windows desktop icons to a small size.

However, when I use group policy to change this registry value to 32 like you have indicated this doesn't change the size of the user's existing desktop icons to small and also when new users log on their desktop icons remain large instead of changing to small (even after the group policy has applied).

The only way I have been able to get this to work is by using the batch file above which fist closes Windows Explorer, makes the registry change, and then relaunches Windows Explorer.

I would like to be able to make this change strictly through group policy so I'm trying to figure out what other registry values need to be changed by group policy in order to change the size of all user's desktop icons to small without having to run the batch file.

Do you know how this can be done?
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 10 64bit
Back
Top