动态变量

动态变量是在应用配置时由 Endpoint Central 动态替换的变量。顾名思义,这些变量的值对所有用户/计算机并不相同。

例如,若要将所有用户共有的开始菜单快捷方式重定向到系统驱动器,您可以使用动态变量 $SystemDrive。部署配置时,该变量将被替换为该计算机对应的系统驱动器(如 C、D 等)。

下表列出了支持的动态变量 Endpoint Central:

动态变量 说明

变量示例值

$ComSpec

指定命令解释器的路径

C:\WINNT\system32\cmd.exe

$HomePath

指代 UMD/AD 中定义的主目录

\\JOHNSMITH\

$NtType

NT/2000/XP 计算机的角色

Server, Workstation

$OS

当前安装操作系统的简称

Windows_NT

$OSVersion

2000 和 XP 将返回为 NT

Windows 2000

$OStype

2000 和 XP 将返回为 NT

NT

$OsBuildNumber

指代当前安装操作系统的版本号

1381, 2195

$OsCsdVersion

指代当前安装操作系统的服务包

Service Pack 4

$ProfileDirDU

将替换为“默认用户”配置文件的完整路径

C:\Documents and Settings\Default User

$ProfilesDir

将替换为存储用户配置文件的位置的完整路径

C:\Documents and Settings

$ShellCache

将替换为当前用户临时 Internet 文件的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Local Settings\Temporary Internet Files

$ShellCookies

将替换为当前用户 Internet Cookies 的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Cookies

$ShellDesktop

将替换为当前用户桌面的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Desktop

$ShellFavorites

将替换为当前用户收藏夹的 shell 文件夹路径(也称为“IE 书签”)

C:\Documents and Settings\JohnSmith\Favorites

$ShellHistory

将替换为当前用户历史记录的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Local Settings\History

$ShellMyPictures

将替换为当前用户“我的图片”的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\My Documents\My Pictures

$ShellNetHood

将替换为当前用户网络邻居的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\NetHood

$ShellPersonal

将替换为当前用户“个人”的 shell 文件夹路径(也称为“我的文档”)

C:\Documents and Settings\JohnSmith\My Documents

$ShellPrintHood

将替换为当前用户打印机邻居的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\PrintHood

$ShellPrograms

将替换为当前用户开始菜单程序的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Start Menu\Programs

$ShellRecent

将替换为当前用户最近文档的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Recent

$ShellSendTo

将替换为当前用户“发送到”的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\SendTo

$ShellStartMenu

将替换为当前用户开始菜单的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Start Menu

$ShellStartup

将替换为当前用户开始菜单启动项的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Start Menu\Programs\Startup

$ShellTemplates

将替换为当前用户模板的 shell 文件夹路径

C:\Documents and Settings\JohnSmith\Templates

$SystemDrive

指代操作系统文件所在驱动器

C:

$SystemRoot

将替换为操作系统文件夹的路径

C:\WINNT

$TempDir

将替换为客户端临时目录的路径

C:\Documents and Settings\JohnSmith\Local Settings\Temp

$WinDir

将替换为用户 Windows 文件夹的路径(通常与 SystemRoot 相同,终端服务器例外)

C:\WINNT