Question : Problem: How to enable the clock in the system tray in Terminal Services/Citrix XenApp

I have been messing with this for 2 days now to no avail.  I have researched numerous online forums, but I am still stumped.

I need to enable the clock in the system tray in a TS/Citrix environment.  I am using GPO and have disabled the 2 choices to hide the notificaiton area and hide clock.  I created a registry entry that I am importing using AppSense, however I have also tried this using a login script.

Here is my registry value.  Any.. PLEASE HELP!

Windows Registry Editor Version 5.00


Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2]
"Settings"=hex:33,32,2c,33,38,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,\
  33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,36,36,2c,36,36,2c,32,63,2c,36,\
  36,2c,36,36,2c,32,63,2c,36,36,2c,36,36,2c,32,63,2c,5c,0d,0a,20,20,36,36,2c,\
  36,36,2c,32,63,2c,33,30,2c,33,36,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,\
  30,2c,33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,33,33,2c,32,63,\
  2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,5c,0d,0a,\
  20,20,33,30,2c,32,63,2c,33,33,2c,36,36,2c,32,63,2c,33,30,2c,33,30,2c,32,63,\
  2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,31,2c,36,35,2c,\
  32,63,2c,35,63,2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,\
  30,2c,5c,0d,0a,20,20,33,30,2c,32,63,2c,36,36,2c,36,35,2c,32,63,2c,36,36,2c,\
  36,36,2c,32,63,2c,36,36,2c,36,36,2c,32,63,2c,36,36,2c,36,36,2c,32,63,2c,36,\
  35,2c,33,34,2c,32,63,2c,33,30,2c,33,32,2c,32,63,2c,33,30,2c,33,30,2c,32,63,\
  2c,33,30,2c,33,30,2c,5c,0d,0a,20,20,32,63,2c,33,30,2c,33,32,2c,32,63,2c,33,\
  30,2c,33,34,2c,32,63,2c,33,30,2c,33,30,2c,32,63,2c,33,30,2c,33,30,2c,32,63,\
  2c,33,30,2c,33,32,2c,32,63,2c,33,30,2c,33,33,2c,32,63,2c,33,30,2c,33,30,2c,\
  32,63,2c,33,30,2c,33,30
Open in New Window Select All

Answer : Problem: How to enable the clock in the system tray in Terminal Services/Citrix XenApp

OK, I was able to solve this.  Sorry for the complexity of this answer... but it did work:

  1. Follow the directions from the following link:  http://www.freelists.org/archives/thin/02-2003/msg00132.htm 
  2. The information above is really for Win2K or NT 4.0, so you have to modify the following line: 
    • "%windir%\system32\SetTaskBarOptions.vbs"cscript"  must be changed to "%systemroot%\system32\SetTaskBarOptions.vbs" //Nologo" 
  3. I cleaned up the code to remove all the REM lines and information I don;t need such as the command for NT 4.0, you can see it below.  
     
  4. The default script from the link above is set to make the task bar Always on Top and Use Small Icons.  I wanted normal icons in the Start Menu, so I moved "+ cShowSmallIcons" from the intBitsToSet to intBitsToClear sections 
  5. Next, I created a local user account on each server, logged in and set the desktop to my desired settings.  This included enabling the clock (seems redundant), locking the taskbar, Quicklaunch Icons, start menu settings, etc.).  You could even change the wallpaper, but I do that via GPO instead.  Remember, any settins in your GPO will override these settings. 
  6. I logged back on as local admin 
  7. set the system to install mode (change user /install)
     
  8. Copy the new profile to the deafult user profile.  If you have problems copying over the default user due to files being in use (i.e. index.dat), you may need to boot into safe mode to copy the profile 
  9. Set the system to execute mode (change user /execute) 
  10. These setting will not apply to existin user profiles, therefore you may need to delete the users profile for settings to take effect
     

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
Option Explicit
On Error Resume Next
 
Dim oReg
Dim intBitsToClear, intBitsToSet
Dim strComputer, strKeyPath, strValueName, strValue
 
Const HKEY_CURRENT_USER  = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
 
Const cAutoHideTaskbar   = 1
Const cAlwaysOnTop   = 2
Const cShowSmallIcons   = 4
Const cHideClock   = 8
 
 
'*************** OPTIONS ARE SET HERE ***************
 
intBitsToSet = cAlwaysOnTop 
intBitsToClear = cAutoHideTaskbar + cHideClock + cShowSmallIcons
 
'****************************************************
 
 
strComputer = "."
 
' ***  For Win2K  ***
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Stuckrects2"  
 
strValueName = "Settings"
 
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
oReg.GetBinaryValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
 
'REM  strValue(8) = strValue(8) OR intBitsToSet
'REM  strValue(8) = strValue(8) AND (NOT(intBitsToClear))
 
 
strValue(8) = intBitsToSet
strValue(8) = (NOT(intBitsToClear))
 
oReg.SetBinaryValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
 
 
'   Set: Byte = Byte OR cShowSmallIcons
' Clear: Byte = Byte AND (NOT(cShowSmallIcons)) 
' Check: if ((Byte AND cShowSmallIcons) = cShowSmallIcons)
Open in New Window Select All
Random Solutions  
 
programming4us programming4us