Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script disable "hide inactive icons"

Status
Not open for further replies.

jimshi

Programmer
Aug 26, 2006
6
AU
Dear all,
i want to write a script to uncheck to disable "hide inactive icons".
not go through the windows GUI.

search internet, can not get the solution.
i also check the windows WMI, can not also.

thanks in advance
 
You might be able to do this via the registry.

key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

dword: EnableAutoTray
value: change to a 0

The following will make the change, but it won't be visible until explorer is restarted.

Code:
Dim objReg, strComputer, strKeyPath

Const HKCU = &H80000001

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer"
strComputer = "."

Set objReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
objReg.SetDWORDValue HKCU, strKeyPath, "EnableAutoTray", "0"

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Thanks dm4ever, i got the point, but another question is, if i use GUI after i uncheck the box, and click [OK], it will immedately take effect.
but for edit the registry, i need to Exit your registry; you may need to restart or log out of Windows for the change to take effect.

how can i do like the GUI?

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top