28 lines
1.1 KiB
PowerShell
28 lines
1.1 KiB
PowerShell
# 安装已上传完整的 CAPTCHA fat jar,并重启 8180 主账。禁止动现网 8080。
|
|
$ErrorActionPreference = 'Stop'
|
|
$Src = 'C:\Users\ytd_extdev_0903\incoming\jeecg-system-start-3.5.3.CAPTCHA.jar'
|
|
$Incoming = 'C:\Users\ytd_extdev_0903\incoming\jeecg-system-start-3.5.3.jar'
|
|
$Fat = 'E:\wwwroot\inquiry-new\jeecg-system-start-3.5.3.jar'
|
|
$Expect = 177074039
|
|
|
|
if (-not (Test-Path $Src)) { throw "missing $Src" }
|
|
$len = (Get-Item $Src).Length
|
|
Write-Host ("src_bytes=" + $len)
|
|
if ($len -ne $Expect) { throw ("size mismatch expect=" + $Expect + " got=" + $len) }
|
|
|
|
Get-CimInstance Win32_Process | ForEach-Object {
|
|
if ($_.CommandLine -and ($_.CommandLine -like '*inquiry-new*jeecg*' -or $_.CommandLine -like '*run-ledger*')) {
|
|
Write-Host ("killing=" + $_.ProcessId)
|
|
Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue
|
|
}
|
|
}
|
|
Start-Sleep -Seconds 3
|
|
|
|
Copy-Item $Src $Incoming -Force
|
|
Copy-Item $Src $Fat -Force
|
|
Write-Host ("fat_bytes=" + (Get-Item $Fat).Length)
|
|
Write-Host 'COPIED_CAPTCHA_JAR'
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File C:\Users\ytd_extdev_0903\incoming\_remote_wmi_start_ledger.ps1
|
|
Write-Host 'INSTALL_CAPTCHA_DONE'
|