Windows 10: How to reduce system tray icon spacing?

Page 2 of 2 FirstFirst 12
  1.    29 Oct 2017 #11

    After a closer look at Win 10 Powershell I see it has evolved and the DeviceManager addins are not needed. Big difference between Win 7 PS but I'm learning. The following script toggles touchscreen. If touchscreen is on, it disables it. If touchscreen is off, it attempts to enable it. It requires admin rights and the only qualifying it performs is identifying the touchscreen device. It is quick and dirty and may bomb when PS evolves. Tested and ran in PS ISE.

    $TouchScreen = Get-PnpDevice -FriendlyName 'HID-Compliant Touch Screen'
    if ( $TouchScreen.Status -eq 'OK' ) { $TouchScreen | Disable-PnpDevice -confirm:$false }
     else { $TouchScreen | Enable-PnpDevice -confirm:$false }
      My ComputerSystem Spec

  2. Posts : 887
    Windows 10 Home x64 and Pro x86
       31 Oct 2017 #12


    Thanks, I'll experiment with it. Oh & thanks for the links as well, they are interesting.

    And adding in elevation using one of the links you provided gives this as the final result [tested a few times already and it seems reliable] -

    # Escalate privileges if not admin
    If (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
    $Arguments = "& '" + $MyInvocation.mycommand.definition + "'"
    Start-Process powershell -Verb runAs -ArgumentList $Arguments
    $TouchScreen = Get-PnpDevice -FriendlyName 'HID-Compliant Touch Screen'
    if ( $TouchScreen.Status -eq 'OK' ) { $TouchScreen | Disable-PnpDevice -confirm:$false } else { $TouchScreen | Enable-PnpDevice -confirm:$false }

    The system tray icon spacing does close up / open up as the touchscreen is disabled / re-enabled.

      My ComputerSystem Spec

Page 2 of 2 FirstFirst 12

Related Threads
The tried and true method that worked for Vista and 7 does not seem to work with my Windows 10…using regedit then changing HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics values for IconSpacing and IconVerticalSpacing which must be between...
Solved Desktop icon spacing in Customization
I'm used to tweaking the values in HKCU\ControlPanel\Desktop\WindowsMetrics\Icon Spacing in previous version of Windows, but it appears to work a bit differently in Win10. Changing the Icon Spacing from the default of -1560 to, say -2000, gives...
Reserved Win10; yesterday sys tray icon disappeared in Windows Updates and Activation
I reserved Windows 10 on or about July 20th, when the little GWX icon showed up in my system tray. I changed the email address on my Microsoft account last week. I hope this does not matter... I can still get mail at that address for another...
Can't reserve windows 10, no icon in tray. in Installation and Upgrade
I used to have the icon in the system tray, however recently I needed to reset my computer so the reservation at the time was wiped. Having completed the reset I have now found that I cannot reserve a copy of windows 10 through control panel,...
Icon spacing in General Support
How can I space the icons on desktop? How can I make text bigger where I can read it OK? Like when I type in a web address in the bar. Some of my icons or huge and some are small. Please help Jaye
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:35.
Find Us