Remove the Network icon from the systray – Windows 2008
Posted on September 10th, 2009
Windows 2008 has some icons that appear in the systray by default. The network icon is an example that appears even in a terminal server or Citrix session, as shown:
![]()
It is un-necessary clutter that would be best to remove in the terminal server session. However, there is no Group Policy option to do this in a Windows 2003 domain.
The following registry keys are available and can be used to remove all the systray icons:
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCAVolume
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoAutoTrayNotify
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCANetwork
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoTrayItemsDisplay
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideClock
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\HideSCAPower
These can be added as a REG_DWORD and set to 1 to enable the setting.
They can also be added to the HKCU hive if required.
Tags: hide, icon, network, network icon, NIC, registry, remove, systray, Windows 2008
Filed under Scripts/Reg, Windows 2008 | No Comments »
Script variable trimming
Posted on May 8th, 2009
Suppose you are trying to run some scripts based on a command line variable, but the variable being passed to it is surrounded by quote marks.
i.e. “device_name” when all i want is device_name
There is an easy way to trim this. In the script need to set this passed variable to a seperate variable, and then trim it byt doing the following:
SET tempvariable=%1 (need to set %%1 if its run as a script file)
echo %1 (will show “device_name”)
echo %tempvariable% (will show “device_name”)
echo %tempvariable:~1,-1% (will show device_name)
The trimmed variable can then be used for another task, i.e. to start a service on a remote server
sc \\%tempvariable:~1,-1% start “ServiceName”
Happy trimming!
Tags: ", %1, clean, cmd, device_name, edgesight, remove, sc, script, set, trimming, variable
Filed under Scripts/Reg | 1 Comment »
