How To Stop Desktop Icons from Rearranging in Windows



Tidy up desktop icons and prevent them from being rearranged with this Windows program.

If your Windows desktop icons get rearranged without you doing anything or making any changes or someone else moves them around, this small utility keeps them in place.

Occasionally when I boot my computer up, my desktop icons are rearranged or moved. I have two monitors, it's disconcerting to find several icons moved to the other monitor and seemingly stacked one atop another, so they have to be moved one at a time to the original monitor. They haven't moved since I installed DeskLock.

For DeskLock to work properly, it needs to be installed as Administrator. After downloading and unzipping DeskLock, open the folder, right click on DeskLock.exe and choose Run as administrator. Note that opening an elevated command prompt and installing DeskLock doesn't lock the desktop. It doesn't allow anything on the desktop to be moved, but if you click and drag an icon, it will move from its position and be automatically inserted into the next available space while the other icons shift a space to maintain position.

You may want to arrange your desktop the way you prefer before installing DeskLock. You can easily enable and disable the program by double clicking the icon in the system tray, but arranging icons in your preferred configuration before you install the program could save some time. Any new desktop icons will be added to next available space in the grid.

After installation, DeskLock creates an icon in the system tray. You can change the options by right clicking the icon in the system tray. There's an option to uncheck Enable (disables the program) and the Settings menu has more options; check or uncheck Lock icons, Disable right mouse button, Start disabled, and Show class.
Lock icons and Disable right mouse button are enabled by default. If you use the context menu often, you might want to enable the right mouse button. Other settings set up a Hotkey to disable DeskLock and add classes to lock.

DeskLock is one of many useful programs developed by Donation Coder skrommel and is written in AutoHotKey. If you download the file, you also get the script.

DeskLock runs on most versions of Windows from XP to 10. While VirusTotal returns one flag, other malware programs and scanners show it as clean.

You can download it here:


You can find more Tech Treats here.



Please rate this article: 

Your rating: None
Average: 3.5 (11 votes)


There's a real need for these types of programs. I've used a few over the last 20 years or so. The one I currently use is Desktop Restore. It's a shell program that puts Save Desktop and Restore Desktop in the right-click menu. After you add a new icon you simply right click and Save Desktop then when something rearranges your icons you right-click and select Restore Desktop.

That sounds like a well thought out program, easy to use.

I've used Iconoid for years. The advantage it has, is that it doesn't have to be disabled to put an icon where you want it. However, you do have to tell it to save icon positions when you have the layout just the way you want it. The most needed options are available within a right-click context menu. There are some other options too, You can find it here: I have been using it since Windows 95, I think.
Please note: "Iconoid works on Windows 8 & 10 but hasn't been extensively tested on either."

That looks like another good program, you all have come up some with great suggestions. :)

at rhiannon,
Thanks for this. I've tried everything I could find since 2005 but nothing actually (stopped) them from moving. Most everything put them back pretty good. (but still a pain in the buTTocks)
I noticed you talking about new icons go to the next available grid space ... but it will lock in a non-grid type format or personal preference-like pattern, right?
Sorry if I missed that info.


It depends on your icon settings - if they are set to align icons to grid, auto arrange icons, or both it will place icons in different places.

If only auto arrange is checked it will add a new icon to the next space in a group of icons.

If only align to grid is checked, it added a new icon to the approximate center of the screen.

With both align to grid and auto arrange unchecked it placed the new icon in the approximate center of the screen.

Whatever configuration your desktop is when you installed it is how it will stay. If you add a new icon and want it somewhere else, double click the icon in the system tray to disable it, move the icon where you want it, and double click the program icon in the system tray again to lock the desktop.

thanks for the answer. At the website I couldn't find any documentation but I found one question about program, unanswered since 2018.
I've got a Donation Coder serial number but seldom remember to go by there.

thanks again,

You're welcome.

I use a program called DesktopOK. You don't install it buy just run it, save the icon locations, and if they get moved around you can just hit restore. It was mentioned on this site in 2013 and 2014.

He still maintains that program regularly

Thanks, I hadn't seen that one. It looks like a great program, nice to see it's being updated.