Script to Fix the Delivery Services Console Shortcut

This script will update any shortcuts to the Delievery Services Console (DSC) and Access Management Console (AMC).

Launching the DSC or AMC on 64-bit system is a bit of a challenge. The CmiLaunch.exe does not work correctly on a 64-bit system. It does not start and we receive the following three errors in the System Event Logs:

Event Source: SideBySide
Event ID: 59
Description: Generate Activation Context failed for C:\WINDOWS\SysWOW64\mmc.exe. Reference error message: The referenced assembly is not installed on your system.

Event Source: SideBySide
Event ID: 59
Description: Resolve Partial Assembly failed for Microsoft.Windows.Common-Controls. Reference error message: The referenced assembly is not installed on your system.

Event Source: SideBySide
Event ID: 32
Description: Dependent Assembly Microsoft.Windows.Common-Controls could not be found and Last Error was The referenced assembly is not installed on your system.

The issue is actually caused by the MS hotfix KB942589 we apply on the 64-bit builds. But this is an important hotfix, so we can’t remove or exclude it. This is further explained by Microsoft in a Technet article titled “Controlling your MMC Snap-ins on 64-bit Operating Systems“. So we need to run the cmi20.msc instead from the “%CommonProgramFiles(x86)%\Citrix\Access Management Console – Framework” folder.

It’s important to note that the cmi20.msc is a 32-bit MMC, and should therefore be launched with the 32-bit MMC by using the following command line:

“%SystemRoot%\system32\mmc.exe” /32 “%CommonProgramFiles(x86)\Citrix\Access Management Console – Framework\cmi20.msc”


‘ This script will update any shortcuts to the Delievery Services Console (DSC) and Access Management Console (AMC).
‘ Launching the DSC or AMC on 64-bit system is a bit of a challenge. The CmiLaunch.exe does not work correctly on a 64-bit
‘ system. It does not start and we receive the following three errors in the System Event Logs:
‘ Event Source: SideBySide
‘ Event ID: 59
‘ Description: Generate Activation Context failed for C:\WINDOWS\SysWOW64\mmc.exe. Reference error message: The referenced
‘ assembly is not installed on your system.
‘ Event Source: SideBySide
‘ Event ID: 59
‘ Description: Resolve Partial Assembly failed for Microsoft.Windows.Common-Controls. Reference error message: The
‘ referenced assembly is not installed on your system.
‘ Event Source: SideBySide
‘ Event ID: 32
‘ Description: Dependent Assembly Microsoft.Windows.Common-Controls could not be found and Last Error was The referenced
‘ assembly is not installed on your system.
‘ The issue is actually caused by the MS hotfix (KB942589) we apply on the 64-bit builds. But this is an important hotfix,
‘ so we can’t remove or exclude it. This is further explained in the following Microsoft Technet article:
‘ http://blogs.technet.com/askperf/archive/2008/04/25/controlling-your-mmc-snap-ins-on-64-bit-operating-systems.aspx
‘ So we need to run the cmi20.msc instead from the “%CommonProgramFiles(x86)%\Citrix\Access Management Console – Framework”
‘ folder.
‘ It’s important to note that the cmi20.msc is a 32-bit MMC, and should therefore be launched with the 32-bit MMC by using
‘ the following command line:
‘ “%SystemRoot%\system32\mmc.exe” /32 “%CommonProgramFiles(x86)\Citrix\Access Management Console – Framework\cmi20.msc”

‘ Release 1.0
‘ Written by Jeremy@jhouseconsulting.com on 22nd November 2009.

Option Explicit

Dim WshShell, strAUPrograms, strProcessorArchitecture, strShortcut

Set WshShell = WScript.CreateObject(“WScript.Shell”)

strAUPrograms = WshShell.SpecialFolders(“AllUsersPrograms”)
strProcessorArchitecture = WshShell.ExpandEnvironmentStrings(“%PROCESSOR_ARCHITECTURE%”)

If lcase(strProcessorArchitecture) <> “x86” Then

strShortcut = strAUPrograms & “\Citrix\Management Consoles\Access Management Console.lnk”
Call CreateShortcut(strShortcut)

strShortcut = strAUPrograms & “\IT Tools\Citrix\Management Consoles\Access Management Console.lnk”
Call CreateShortcut(strShortcut)

strShortcut = strAUPrograms & “\Citrix\Management Consoles\Delivery Services Console.lnk”
Call CreateShortcut(strShortcut)

strShortcut = strAUPrograms & “\IT Tools\Citrix\Management Consoles\Delivery Services Console.lnk”
Call CreateShortcut(strShortcut)

End If

Set WshShell = Nothing

wscript.quit(0)

Sub CreateShortcut(strShortcut)
Dim objFSO, objShortcut, strSystemRoot, strCommonProgramFilesx86
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
strSystemRoot = WshShell.ExpandEnvironmentStrings(“%SystemRoot%”)
strCommonProgramFilesx86 = WshShell.ExpandEnvironmentStrings(“%CommonProgramFiles(x86)%”)
If objFSO.FileExists(strShortcut) Then
objFSO.DeleteFile(strShortcut)
Set objShortcut = WshShell.CreateShortcut(strShortcut)
objShortcut.TargetPath = chr(34) & strSystemRoot & “\system32\mmc.exe” & chr(34)
objShortcut.Arguments = “/32 ” & chr(34) & strCommonProgramFilesx86 & “\Citrix\Access Management Console – Framework\cmi20.msc” & chr(34)
objShortcut.WorkingDirectory= strCommonProgramFilesx86 & “\Citrix\Access Management Console – Framework\”
objShortcut.IconLocation = strCommonProgramFilesx86 & “\Citrix\Access Management Console – Framework\CmiLaunch.exe,0”
objShortcut.Description = “Manage XenApp”
objShortcut.Save
Set objShortcut = Nothing
End If
set objFSO = Nothing
End Sub

Jeremy Saunders

Jeremy Saunders

Delivering customer success through tech: IT Infrastructure | Citrix | End User Computing | Platform Engineering | DevOps | Full Stack Developer | Technical Architect | Improvisor | Aspiring Comedian | Midlife Adventurer at J House Consulting
Jeremy Saunders is the Problem Terminator; the MacGyver of IT. Views and Intellectual Property (IP) published on this site belong to Jeremy. Please refer to the About page for more information about Jeremy.