用户必须安装 Citrix Connection Manager 才能在家工作。
通常,他们打开
.ICA
文件的默认程序设置为浏览器或根本不设置。
一些用户不知道如何执行此操作,并且仍然对非常详尽的分步指南有疑问。用户安装 CCM 后,它位于
C:\Program Files (x86)\Citrix\ICA Client\wfcrun32.exe
。
无法找到以前成功完成此任务的脚本。
下面使用
cmd.exe
的内部 assoc
和 ftype
命令将 .ica
文件与名为 CitrixConnection
的自创建文件类型关联起来,这意味着此类文件将以可执行文件指定为文件类型定义的一部分。
cmd.exe
命令,必须通过 PowerShell 中的 cmd /c
调用它们。这些命令需要elevation才能运行,因为它们创建机器级(所有用户)定义。
#requires -RunAsAdministrator
# NOTE: There must be NO SPACE before `&&`, as that space would
# otherwise become part of the argument value (even with "..." quoting).
cmd /c @"
assoc .ica="CitrixConnection"&& ftype CitrixConnection="C:\Program Files (x86)\Citrix\ICA Client\wfcrun32.exe"
"@
请注意使用(可扩展)here-string (@"<newline>...<newline>"@
),以便更轻松地使用embedded引用。
删除这些定义,运行:
#requires -RunAsAdministrator
# NOTE: There must be NO SPACE before `&`.
quoting).
cmd /c 'assoc .ica=& ftype CitrixConnection='