Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: CHange Desktop icon size via registry


12 Feb 2014   #1

Windows 8.1 Pro and Windows 7 Professional (both x64)
 
 
CHange Desktop icon size via registry

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 System SpecsSystem Spec
.

12 Feb 2014   #2

Win7 H.Prem. 32bit+SP1
 
 

Hi Butters, right click empty desktop &:-

Name:  RR.jpg
Views: 48
Size:  46.6 KB


My System SpecsSystem Spec
13 Feb 2014   #3

Windows 8.1 Pro and Windows 7 Professional (both x64)
 
 

I already know how to do that. The thing is I need the location of where this is stored in the registry.
My System SpecsSystem Spec
.


13 Feb 2014   #4

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Butters View Post
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.
Quote   Quote: Originally Posted by Butters View Post
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.)

CHange Desktop icon size via registry-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 System SpecsSystem Spec
13 Feb 2014   #5

Windows 8.1 Pro and Windows 7 Professional (both x64)
 
 

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 System SpecsSystem Spec
13 Feb 2014   #6

W7 Pro SP1 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.

Also, how would you prevent users from changing the settings?
My System SpecsSystem Spec
14 Feb 2014   #7

Windows 8.1 Pro and Windows 7 Professional (both x64)
 
 

Quote   Quote: Originally Posted by UsernameIssues View Post
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?

Quote   Quote: Originally Posted by UsernameIssues View Post
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.
My System SpecsSystem Spec
14 Feb 2014   #8

W7 Pro SP1 64bit
 
 

>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 System SpecsSystem Spec
18 Feb 2014   #9

Windows 8.1 Pro and Windows 7 Professional (both x64)
 
 

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 System SpecsSystem Spec
18 Feb 2014   #10

W7 Pro SP1 64bit
 
 

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 System SpecsSystem Spec
Reply

 CHange Desktop icon size via registry




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 10:00 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33