Archive: October, 2010

KB975777: There is a delay when you shut down, restart, or log off a computer that is running Windows 7 or Windows Server 2008 R2

No comments October 14th, 2010

If your users are having trouble loging out form your servers, getting the message

1 program still needs to close:
(Waiting for) Task Host Window

Then this KB is for you. This will patch taskhost.exe to handle the problem.

From the KB article:

Symptoms:

Consider the following scenario:

  • You have a computer that is running Windows 7 or Windows Server 2008 R2.
  • You try to shut down, restart, or log off the computer.

In this scenario, the logoff process stops for about six seconds. Additionally, you receive the following message:
1 program still needs to close:
(Waiting for) Task Host Window
Cause:
This problem occurs because the TaskHost.exe process stops handling messages during system shutdown, during system restart, and during system logoff.

Here is the link to the KB.

HOWTO: Remove Favorites from Explorer Folder View

No comments October 14th, 2010

This is how you remove the Favorites Link in the explorer folder view:

  1. Open regedit and go to [HKEY_CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
  2. Open regedit and go to [HKEY_CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
  3. In “ShellFolder” go to ‘Attributes’ and change the value from 0xa0900100 to 0xa400100. (Or to 0xa9400100)
  4. Reboot your machine. If everything is done correctly “Favorites” should now be disabled completely when your system is rebooted.

Enjoy

UPM using 100% cpu

1 comment October 8th, 2010

I have seen the UPM taking 100% cpu a few times, or taking 100% cpu from one core as its not multi-threaded. In all of the cases a corrupt UPM cache file was the problem. Its located in C:\Program Files\Citrix\User Profile Manager and called “UserProfileManager_C.cache”. I just deleted it and restarted the UPM service and problem solved.

Im thinking of making a policy that deletes that file on every reboot as its only a cache file and it wont make a difference if its not there when the UPM starts, as it creates a new one when it needs it.

Citrix on VMWare

No comments October 8th, 2010

I ran into a problem with one of my servers on vmware the other day. HGFS, vmware shared folders, was activated for some reason. The symptoms was that the desktop background image disappeared after each log off which made the user always get a black background every time he logged on. I also noticed that it never deleted any profiles from the server. So when you logged on it just created a new one like user.dom.000 and next time user.dom.001 and so on. To diagnose the problem i turned full logging on in the UPM. I found this:

DeleteAnyFile: Deleting the file <C:\Users\user.dom.013\AppData\Local\VMware\hgfs.dat> failed with: The process cannot access the file because it is being used by another process.

I started google it and found this. Which says how to disable hgfs through the registry.

In the registry find the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order\ and edit ProviderOrder. Remove hgfs from there and reboot the machine.

After this everything worked perfect.

Create a Set of Default Applications

No comments October 2nd, 2010

Where I work we create a default set of applications to all of our customers. So I wrote this script to do it for me. It can easily be customized to anyones needs if someone wants something similar. This is for Xenapp 6 and needs to be modified to run on Xenapp 5.

Download


cls
Write-Host
Write-Host
Write-Host "#########################################################################################"
Write-Host "## Before you run this scripte there are a few thing you need to have create before. ##"
Write-host "## 1. The officeremotedesktopusers group of the company. ##"
Write-Host "## 2. The officeusers group. ##"
write-host "## 3. a workergroup named after the company. ##"
Write-Host "## 4. And a folder named after the company in the citrix console. ##"
Write-Host "## ##"
Write-Host "## Written By Roger Eklund (gobba@sajberhagen.com) ##"
Write-Host "#########################################################################################"
Write-Host
Write-Host
Write-Host "Allright Lets Start!"
Write-Host
Write-Host "Company name:(Demo) " -NoNewline
$Company = read-host
Write-Host "Upn Suffix:(demo.org) " -NoNewline
$Upn = Read-Host
Write-Host "Server Where applications is installed:(servername) " -NoNewline
$Server = Read-Host

# Desktop
New-XAApplication -ApplicationType "ServerDesktop" -DisplayName "Desktop" -Description "$Company Desktop" -FolderPath "Applications/$Company" -BrowserName "$Company Desktop"
Add-XAApplicationWorkerGroup -BrowserName "$Company Desktop" -WorkerGroupNames $Company
Add-XAApplicationAccount -BrowserName "$Company Desktop" -Accounts "OfficeRemoteDesktopUsers@$Upn"

# Word
$icon = Get-CtxIcon "\\$Server\C$\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Word" -Description "$Company Word" -FolderPath "Applications/$Company" -BrowserName "$Company Word" -CommandLineExecutable '"C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE"' -WorkingDirectory "C:\Program Files (x86)\Microsoft Office\Office12" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Word" -Accounts "OfficeUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Word" -WorkerGroupNames $Company

# Excel
$icon = Get-CtxIcon "\\$Server\C$\Program Files (x86)\Microsoft Office\Office12\excel.EXE" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Excel" -Description "$Company Excel" -FolderPath "Applications/$Company" -BrowserName "$Company Excel" -CommandLineExecutable '"C:\Program Files (x86)\Microsoft Office\Office12\EXCEL.EXE"' -WorkingDirectory "C:\Program Files (x86)\Microsoft Office\Office12" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Excel" -Accounts "OfficeUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Excel" -WorkerGroupNames $Company

# Outlook
$icon = Get-CtxIcon "\\$Server\C$\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Outlook" -Description "$Company Outlook" -FolderPath "Applications/$Company" -BrowserName "$Company Outlook" -CommandLineExecutable '"C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE"' -WorkingDirectory "C:\Program Files (x86)\Microsoft Office\Office12" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Outlook" -Accounts "OfficeUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Outlook" -WorkerGroupNames $Company

# Powerpoint
$icon = Get-CtxIcon "\\$Server\C$\Program Files (x86)\Microsoft Office\Office12\POWERPNT.EXE" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Powerpoint" -Description "$Company Powerpoint" -FolderPath "Applications/$Company" -BrowserName "$Company Powerpoint" -CommandLineExecutable '"C:\Program Files (x86)\Microsoft Office\Office12\POWERPNT.EXE"' -WorkingDirectory "C:\Program Files (x86)\Microsoft Office\Office12" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Powerpoint" -Accounts "OfficeUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Powerpoint" -WorkerGroupNames $Company

# Explorer
$icon = Get-CtxIcon "C:\Windows\explorer.exe" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Explorer" -Description "$Company Explorer" -FolderPath "Applications/$Company" -BrowserName "$Company Explorer" -CommandLineExecutable '"C:\Program Files\Internet Explorer\iexplore.exe" -e h:\' -WorkingDirectory "%windir%" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Explorer" -Accounts "OfficeRemoteDesktopUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Explorer" -WorkerGroupNames $Company

# Internet Explorer
$icon = Get-CtxIcon "C:\Program Files\Internet Explorer\iexplore.exe" -Index 0
New-XAApplication -ApplicationType "ServerInstalled" -DisplayName "Internet Explorer" -Description "$Company Internet Explorer" -FolderPath "Applications/$Company" -BrowserName "$Company Internet Explorer" -CommandLineExecutable "C:\Program Files\Internet Explorer\iexplore.exe" -WorkingDirectory "C:\Program Files (x86)\Internet Explorer\" -EncodedIconData $icon
Add-XAApplicationAccount -BrowserName "$Company Internet Explorer" -Accounts "OfficeRemoteDesktopUsers@$Upn"
Add-XAApplicationWorkerGroup -BrowserName "$Company Internet Explorer" -WorkerGroupNames $Company