CodePudding user response:
Please use WinAPI (+ powershell), simulate the mouse is usedDesktop icon position: refer to the C language macro ListView_SetItemPosition etc (desktop is a ListView)
HKCU registry item \ Software \ Microsoft \ \ Windows \ Shell \ Bags \ 1 Desktop value IconLayouts
The Size of the Desktop Icon: HKCU registry items, Control Panel, Desktop, WindowMetrics value Shell Icon Size
After changing the registry with SHChangeNotify refreshes the desktop