CHange Desktop icon size via registry

Page 1 of 2 12 LastLast

  1. Posts : 195
    Windows 7 Professional x64
       #1

    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 Computer


  2. Posts : 2,362
    Win7 H.Prem. 32bit+SP1
       #2

    Hi Butters, right click empty desktop &:-

    CHange Desktop icon size via registry-rr.jpg
      My Computer


  3. Posts : 195
    Windows 7 Professional x64
    Thread Starter
       #3

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


  4. Posts : 10,485
    W7 Pro SP1 64bit
       #4

    Butters said:
    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.
    Butters said:
    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 Computer


  5. Posts : 195
    Windows 7 Professional x64
    Thread Starter
       #5

    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


  6. Posts : 10,485
    W7 Pro SP1 64bit
       #6

    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


  7. Posts : 195
    Windows 7 Professional x64
    Thread Starter
       #7

    UsernameIssues said:
    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?

    UsernameIssues said:
    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 by Butters; 18 Feb 2014 at 15:23.
      My Computer


  8. Posts : 10,485
    W7 Pro SP1 64bit
       #8

    >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


  9. Posts : 195
    Windows 7 Professional x64
    Thread Starter
       #9

    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


  10. Posts : 10,485
    W7 Pro SP1 64bit
       #10

    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


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 21:09.
Find Us