许可证管理员或NI软件交付经理可自动化完成软件激活并添加批量许可证服务器。

要实现该操作,请通过命令行或批处理文件使用NILicensingCmd.exe运行许可证管理器

NILicensingCmd.exe的路径如下:
  • 64位计算机:Program Files (x86)\National Instruments\Shared\License Manager\NILicensingCmd.exe
备注 如需激活大量许可证,可考虑使用有批量许可证协议的批量许可证管理器简化许可证激活过程。详细信息请访问软件批量许可证项目网页。

软件激活命令行标志

下表包含与软件激活相关的常见命令行标志。如需查看许可证管理器命令行标志的说明,请输入命令NILicensingCmd.exe /help

标志 说明 语法 范例
/activateall

启动激活软件窗口。

该命令的作用等同于单击许可证管理器中的激活软件按钮。

NILicensingCmd.exe /silent /activateall /serialnumber <序列号> NILicensingCmd.exe /silent /activateall /serialnumber A11B11C11
/activate /type package

启动激活软件窗口,激活预先选择的程序包或产品系列。

这些命令的作用等同于在许可证管理器中右键单击软件或产品系列并选择激活软件

NILicensingCmd.exe /activate /type package /name <程序包名> /version <版本> /serialnumber <序列号> NILicensingCmd.exe /activate /type package /name LabVIEW_PDS_PKG /version 17.0000 /serialnumber A111A1A11
/activate /type family NILicensingCmd.exe /activate /type family /name <产品系列名> /serialnumber <序列号> NILicensingCmd.exe /activate /type family /name LabVIEW_ADE_170000 /serialnumber A12B12345
/applyactivationcodes

使用所提供的激活码激活一个或多个许可证。该命令的作用等同于单击激活软件并在许可证管理器中选择输入激活码

NILicensingCmd.exe /applyactivationcodes [<激活码1>,<激活码2>, [, ...]] NILicensingCmd.exe /applyactivationcodes 5CFL-Q7JG-X7GV-XL83-NDSM,FHFZ-V3MP-S3RY-FHRJ-69HY
/silent
静默激活软件。
备注 此命令需要网络连接,以通过加密Web连接(https)访问NI网站。

静默激活状态下,序列号为可选。如在运行命令行参数前登录NI用户账号,许可证管理器将检查用户账号是否包含必要的软件许可证。

如有以下情况,静默激活将失败:
  • 输入的信息不正确或不完整,例如序列号无效
  • 未登录账号
  • 您的账号关联了冲突的许可证
  • 您的账号未关联必要许可证,且未将任何序列号作为参数发送
备注 如果静默激活失败,错误信息将不会显示,以避免中断其余的自动化脚本。您必须先手动激活失败的软件,然后才能使用。
NILicensingCmd.exe /silent /activate /type package /name <程序包名> /version <版本> /serialnumber <序列号> NILicensingCmd.exe /silent /activate /type package /name LabVIEW_PDS_PKG /version 9.0000 /serialnumber A111A1A11
/addservers

在无提示状态下为计算机添加批量许可证服务器并签出许可证。

该命令的作用等同于通过选择 » 管理批量许可证服务器来添加批量许可证服务器。

NILicensingCmd.exe /addservers 服务器名[:端口号][,服务器名[:端口号],...]
  • NILicensingCmd.exe /addservers server1
  • NILicensingCmd.exe /addservers server1:28000
  • NILicensingCmd.exe /addservers server1:28000,server2