回复:有人使用腳本或集中式工具管理加載項嗎? 也許是通過 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 腳本自動安裝和更新特定的加載項列表,並想知道是否有人願意分享他們的經驗、建議或遇到的障礙。
自動化和腳本編寫