Forum Discussion

Pesche57's avatar
Pesche57
Copper Contributor
Oct 18, 2020

Show/hide desktop icons with Powershell only work once

my goal is to toggle the desktop icons on/off with one click (powershell script @ tasklist). i wrote the script below. it works the first time that i ran it (switch off). while the second run the reg key has changed, but after the explorer refreshed the reg key was set back to old value. with right-click and refresh desktop, everything works fine. i dont know what happens here and i've not found any help.

3 Replies

Resources