回复:有人使用脚本或集中式工具管理加载项吗? 也许是通过 Microsoft System Center Configuration Manager (SCCM) 的 PowerShell 脚本?你好, @ih .
可以在此线程中解决您的问题的答案吗?
https://community.jmp.com/t5/JMP-Scripts/How-to-write-self-updating-JMP-add-ins/ta-p/21932/
回复:有人使用脚本或集中式工具管理加载项吗? 也许是通过 Microsoft System Center Configuration Manager (SCCM) 的 PowerShell 脚本?我终于抽出时间来解决这个问题。如将自定义文件添加到软件仓库部分中所述部署指南,ProgramData 文件夹使这些自动化变得非常容易,因为每次 JMP 启动时它都会在这些文件夹中查找。(谢谢@Bobby_Riggs for pointed me to that folder.) 因此,PowerShell 脚本只需要更新这些文件夹即可安装加载项并设置默认用户首选项。
下面是一个脚本草稿,用于安装插件、安装许可证文件,然后在用户首选项中设置许可证文件的位置:
# Instructions:
# Load add-ins and license files to the location spcified with SourceDir below.
#
# These files should be in that directory:
# JMPOSIPITools.jmpaddin
# JMPScriptingTools v1.16.jmpaddin
# JMPValidation.jmpaddin
# JMP.PER
#
# The jmp.per file can be copied from another installation, or created using the license update tool that is installed with JMP.
# Run this script in powershell
#Set location where add-ins and the license file are available, can be a network drive
$SourceDir = "C:\Temp\JMPInstallSource"
# JMP Install Directory
$InstallDir = "C:\Program Files\SAS\JMPPRO\17"
#Load the License File
$LicenseFile = $InstallDir+"\jmp.per"
Copy-Item $SourceDir"\jmp.per" $LicenseFile -Force
# Create directories if needed
New-Item -Path $Env:ALLUSERSPROFILE"/SAS" -ItemType Directory -Force
New-Item -Path $Env:ALLUSERSPROFILE"/SAS/JMPPRO" -ItemType Directory -Force
New-Item -Path $Env:ALLUSERSPROFILE"/SAS/JMPPRO/17" -ItemType Directory -Force
$AddinDir = $Env:ALLUSERSPROFILE+"/SAS/JMPPRO/addins"
New-Item -Path $AddinDir -ItemType Directory -Force
# Create preferences file that links to the license file
$fn = $Env:ALLUSERSPROFILE+"/SAS/JMPPRO/17/JMP.PFS"
New-Item -Force $fn
Set-Content $fn "Preferences(
File Location Settings(
License File Path( $LicenseFile )
)
);"
#procedure to unzip an add-in and load it in the shared folder
function LoadAddin {
param(
$name
)
Copy-Item $SourceDir"\"$name".jmpaddin" $Env:temp"\"$name".zip" -Force
New-Item -Path $AddinDir"\"$name"" -ItemType Directory -Force
Expand-Archive $Env:temp"\"$name".zip" -DestinationPath $AddinDir"\"$name"" -Force
}
#Load each add-in
LoadAddin("JMPOSIPITOOLS")
LoadAddin("JMPScriptingTools v1.16")
LoadAddin("JMPValidation")
请注意,在我的例子中,我还想为这些加载项设置默认用户首选项,我正在使用在登录时运行的 powershell 脚本来执行此操作。 如果我需要完全删除一个加载项,我也会在这个脚本中这样做。
回复:有人使用脚本或集中式工具管理加载项吗? 也许是通过 Microsoft System Center Configuration Manager (SCCM) 的 PowerShell 脚本?没关系,我只是重新阅读了您的消息 - 抱歉!
回复:有人使用脚本或集中式工具管理加载项吗? 也许是通过 Microsoft System Center Configuration Manager (SCCM) 的 PowerShell 脚本?我还没有(还)将任何加载项或自定义功能(很可能也包含在加载项中)推送到用户 PC,但很可能会在未来这样做。
我想到的一些可能的问题:
- 如果用户在您的组织中使用不同版本的 JMP,一些插件可能无法工作
- 计算机上的多个用户
- 根据加载项的安装方式更新所有 .xml 等文件,以便它们在菜单中可见(我认为至少是 addinRegistry.xml)(是否可以使用 comman-dline/powershell 中的 JMP 进行静默安装?)
目前我正在使用 JSL 脚本共享加载项,它将从特定位置获取加载项,然后用户接受安装(加载项在安装后自动更新,同样的安装 jsl 也可用于更新他们)。 这目前适用于我的用例,但我还必须想办法在某个时候推送加载项,因此请密切关注此主题以获得好的想法。
有人使用脚本或集中式工具管理加载项吗? 也许是通过 Microsoft System Center Configuration Manager (SCCM) 的 PowerShell 脚本?是否有人通过脚本或某些中央工具管理加载项安装或更新?我指的不是加载项更新本身,而是指确保每个人都安装了加载项 xyz 2.0 版的工具。我正在考虑通过 SCCM 部署的 PowerShell 脚本自动安装和更新特定的加载项列表,并想知道是否有人愿意分享他们的经验、建议或遇到的障碍。
自动化和脚本编写