Citrix Receiver hangs during task sequence

Citrix Receiver hangs during task sequence

We had a lot of problems getting Citrix Receiver to install correctly during imaging. During imaging it would hang until you moved the mouse or it timed out. Apparently this is a semi-common problem due to how Citrix Receiver installs USB support. We use PowerShell App Deployment Toolkit for all of our deployments so what we ended up doing was mimicking mouse movement if the installer detected we were in a task sequence. We also did a restart step in our task sequence directly before the Citrix Receiver installation.

## <Perform Installation tasks here>
if($runningTaskSequence -eq $false)
{		
	Write-Log -Message "Not in Task Sequence, running Citrix Receiver Installer..." -LogType 'CMTrace'
	Execute-Process -path "$dirfiles\CitrixReceiver.exe" -parameters "/silent /includeSSON /noreboot"
}
else
{
	Write-Log -Message "In Task Sequence, running Citrix Receiver Installer with mouse movement..." -LogType 'CMTrace'
	Execute-Process -path "$dirfiles\CitrixReceiver.exe" -parameters "/silent /includeSSON /noreboot" -nowait
	do
	{
		$Pos = [System.Windows.Forms.Cursor]::Position
		$x = ($pos.X % 500) + 10
		$y = ($pos.Y % 500) + 10
		[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
		Start-Sleep -Seconds 2
		$i++
	}
	while ($i -lt 120)
}

Sources:
http://discussions.citrix.com/topic/330691-citrix-receiver-install-in-mdt-2010-hangs-until-mouse-is-moved
http://stealthpuppy.com/automated-citrix-receiver-deployment-hangs-indefinitely

  1. Is there some form of this script that can be simply run as a powershell command inside of an MDT task sequence?
    I’d like to give it a shot, but i’m not sure which parts of this are dependent on the Powershell App Deployment Toolkit that you are talking about, since I’m not familiar with that at all.

    Thanks!

    1. I would highly recommend you look into the PowerShell App Deployment Toolkit, that being said you should be able to convert this to a regular PowerShell script (.ps1) no problem. I would test this manually first inside windows but something like this should work for MDT:

      CitrixReceiver.exe /silent /includeSSON /noreboot
      do
      {
      $Pos = [System.Windows.Forms.Cursor]::Position
      $x = ($pos.X % 500) + 10
      $y = ($pos.Y % 500) + 10
      [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
      Start-Sleep -Seconds 2
      $i++
      }
      while ($i -lt 120)

  2. Thanks very much for posting this. Saved me a lot of head scratching and easily saved half a day working out how to do the PowerShell script.

  3. The script you posted in the comments worked for me but it generated tons of errors in the MDT logs.
    Unable to find type (system.windows.forms.cursor
    InvalidOperation: runtime exception.

    Anyone else run into that?

Leave a Reply

Internet Explorer
Up Next:

Internet Explorer home page not being set at first logon

Internet Explorer home page not being set at first logon