Novell Home

Remove the NetWare Tray Icon from the Taskbar via the Login Script

Novell Cool Solutions: Tip
By Ben Francom

Digg This - Slashdot This

Posted: 2 Mar 2007
 

Problem:

We have a history application that requires separate rights. Users would forget to close the main accounting application before logging in as a history user. This would cause data stability problems.

Solution:

Since we haven't implemented ZENworks (yet), the solution was to remove the NetWare tray icon from the task bar via login script. This was done using a vb script to modify the registry.

Example:

The login script references a batch script that calls the vb script. The reason for this is that the changes don't take effect until the next login. In our batch script, we have it auto logout. Then on subsequent logins, it runs through.

login script:

@Z:\Resources\batches\login.bat

login.bat:
REM Disable NetWare Tray Icon
If exist C:\nwti.txt goto nwtiDone
echo "FEB" >> C:\nwti.txt
wscript.exe z:\resources\batches\scripts\NWTrayIconNo.vbs
shutdown -l
:nwtiDone

NWTrayIconNo.vbs:
' Toggle use of NW Tray icon 
' Tested on Windows XP SP2 
dim strKey, wshShell, intValue 
strKey = "HKEY_LOCAL_MACHINE\Software\Novell\Network Provider\Menu Items\Enable Systray Icon" 
Set WshShell = WScript.CreateObject("WScript.Shell") 
intValue = wshShell.regRead(strKey) 
wshShell.regWrite strKey, "no", "REG_SZ" 
'msgBox "Nwtray changed to Hidden", vbOk, "NWTray Icon Status"

*Note: To enable the tray icon, change the "no" in the vbscript to "yes" then modify batch script accordingly.

Environment:

Windows XP SP2 Client Version 4.91 sp1


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell