wpscloudsvr 后台启动, 即使退出wps也一直运行, 一直不断请求网络. 弄了命令行关闭wpscloudsvr的方法, 有需要的可以参考.
# 以管理员权限启动 powershell
taskkill /F /IM wpscloudsvr.exe
$wpsBasePath = Join-Path $env:LOCALAPPDATA "Kingsoft\WPS Office\*\office6"
$wpsFiles = @(
"wpscloudsvr.exe",
"wpscloudsvrimp.dll"
)
foreach ($file in $wpsFiles) {
$filePath = Join-Path $wpsBasePath $file
Get-ChildItem -Path $filePath -Recurse -ErrorAction SilentlyContinue | ForEach-Object {
Write-Host "Found: $($_.FullName)"
if ($_.Extension -eq ".exe") {
Stop-Process -Name ($_.BaseName) -Force -ErrorAction SilentlyContinue
}
# 重命名原文件
if (-not (Test-Path "$($_.FullName).bak")) {
Rename-Item -Path $_.FullName -NewName "$($_.Name).bak" -Force
Write-Host "Renamed: $($_.Name) to $($_.Name).bak"
}
}
# 创建空文件
Get-ChildItem -Path $wpsBasePath -Directory | ForEach-Object {
$targetPath = Join-Path $_.FullName $file
$null = New-Item -Path $targetPath -ItemType File -Force -ErrorAction SilentlyContinue
Set-ItemProperty -Path $targetPath -Name IsReadOnly -Value $true -ErrorAction SilentlyContinue
Write-Host "Created empty read-only file: $targetPath"
}
}
macOS 关闭WPS 的 wpscloudsvr 进程
killall -9 wpscloudsvr
PATHS=(
"/Library/Application Support/Kingsoft/office6"
"$HOME/Library/Application Support/Kingsoft/office6"
"/Applications/wpsoffice.app/Contents/Frameworks/office6"
)
for path in "${PATHS[@]}"; do
target="$path/wpscloudsvrimp.framework"
if [ -e "$target" ] && [ ! -e "$target.bak" ]; then
mv "$target" "$target.bak" 2>/dev/null
echo "Renamed: $target to $target.bak"
fi
if [ ! -e "$target" ]; then
touch "$target"
chmod 444 "$target"
echo "Created empty read-only file: $target"
fi
done