Unified WPS Office AI assistant for Excel, Word, PPT - 231 MCP tools | 统一WPS AI助手(Excel/Word/PPT) - 231个MCP工具 | WPS統合AIアシスタント(Excel/Word/PPT) - 231のMCPツール |...
设计与多媒体
禁止WPS反复篡改图片文件默认打开方式
试用Permanently prevent WPS Office from hijacking image file associations, restore user control over default image viewers
它能做什么
Permanently prevent WPS Office from hijacking image file associations, restore user control over default image viewers
技能文档
Prevent WPS Image File Association Hijacking
Overview
This skill permanently disables WPS Office's image viewing module from hijacking system image file associations, solving the problem where WPS secretly changes image default openers to its own image viewer in the background.
Execution Steps
Step 1: Disable WPS Scheduled Tasks
WPS uses scheduled tasks to run in the background and modify file associations. The task names contain user-specific IDs that vary across computers, so we need to detect them dynamically.
Auto-detect and disable all WPS scheduled tasks:
# Find all WPS-related scheduled tasks
$wpsTasks = Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' }
Write-Host "Found $($wpsTasks.Count) WPS scheduled tasks:"
$wpsTasks | Select-Object TaskName, State | Format-Table -AutoSize
# Disable all WPS scheduled tasks
$wpsTasks | ForEach-Object {
try {
Disable-ScheduledTask -TaskName $_.TaskName -ErrorAction Stop
Write-Host "✅ Disabled: $($_.TaskName)"
} catch {
Write-Host "⚠️ Failed to disable: $($_.TaskName) - $($_.Exception.Message)"
}
}
Verification command:
Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' } | Select-Object TaskName, State
Expected result: All WPS scheduled tasks show status "Disabled"
Step 2: Delete WPS Image Registry Entries
WPS registers numerous image format associations (WPS.PIC.*) in the registry that need to be completely removed.
Auto-detect and delete HKCU WPS.PIC entries:
$regItems = Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }
Write-Host "Found $($regItems.Count) WPS.PIC registry entries"
$regItems | ForEach-Object {
try {
Remove-Item -Path $_.PSPath -Recurse -Force -ErrorAction Stop
Write-Host "✅ Deleted: $($_.PSChildName)"
} catch {
Write-Host "⚠️ Failed to delete: $($_.PSChildName) - $($_.Exception.Message)"
}
}
Auto-detect and delete HKLM WPS.PIC entries (if present):
$regItemsHKLM = Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }
if ($regItemsHKLM) {
Write-Host "Found $($regItemsHKLM.Count) WPS.PIC registry entries in HKLM"
$regItemsHKLM | ForEach-Object {
try {
Remove-Item -Path $_.PSPath -Recurse -Force -ErrorAction Stop
Write-Host "✅ Deleted: $($_.PSChildName)"
} catch {
Write-Host "⚠️ Failed to delete: $($_.PSChildName) - $($_.Exception.Message)"
}
}
} else {
Write-Host "No WPS.PIC registry entries found in HKLM"
}
Verification command:
$countHKCU = (Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count
$countHKLM = (Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count
Write-Host "HKCU remaining: $countHKCU, HKLM remaining: $countHKLM"
Expected result: All WPS.PIC.* registry entries are deleted, counts are 0
Step 3: Delete photo.dll Plugin
The core plugin file of WPS image module, located in the addons/photo folder of WPS installation directory. WPS may be installed in multiple locations, so we need to search automatically.
Auto-search and delete all photo.dll files:
# Search common installation paths
$paths = @(
"${env:ProgramFiles}\WPS",
"${env:ProgramFiles(x86)}\WPS",
"${env:LOCALAPPDATA}\WPS",
"C:\WPS",
"D:\WPS",
"E:\WPS"
)
$found = $false
foreach ($basePath in $paths) {
if (Test-Path $basePath) {
$dlls = Get-ChildItem $basePath -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue
foreach ($dll in $dlls) {
try {
Remove-Item -Path $dll.FullName -Force -ErrorAction Stop
Write-Host "✅ Deleted: $($dll.FullName)"
$found = $true
} catch {
Write-Host "⚠️ Failed to delete: $($dll.FullName) - $($_.Exception.Message)"
}
}
}
}
if (-not $found) {
Write-Host "No photo.dll files found"
}
Verification command:
$paths | ForEach-Object {
if (Test-Path $_) {
Get-ChildItem $_ -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue | Select-Object FullName
}
}
Expected result: No photo.dll files found
Step 4: Rename photolaunch.exe Files
WPS image viewer executable file, may exist in multiple versions, needs to be automatically searched and renamed.
Auto-search and rename all photolaunch.exe files:
$paths = @(
"${env:ProgramFiles}\WPS",
"${env:ProgramFiles(x86)}\WPS",
"${env:LOCALAPPDATA}\WPS",
"C:\WPS",
"D:\WPS",
"E:\WPS"
)
$found = $false
foreach ($basePath in $paths) {
if (Test-Path $basePath) {
$exes = Get-ChildItem $basePath -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue
foreach ($exe in $exes) {
try {
$newName = $exe.FullName + ".bak"
Rename-Item -Path $exe.FullName -NewName $newName -Force -ErrorAction Stop
Write-Host "✅ Renamed: $($exe.FullName)"
$found = $true
} catch {
Write-Host "⚠️ Failed to rename: $($exe.FullName) - $($_.Exception.Message)"
}
}
}
}
if (-not $found) {
Write-Host "No photolaunch.exe files found"
}
Verification command:
$paths | ForEach-Object {
if (Test-Path $_) {
Get-ChildItem $_ -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue | Select-Object FullName
}
}
Expected result: No photolaunch.exe files found, only photolaunch.exe.bak
Step 5: Remind User to Manually Set Default Applications
Due to Windows UserChoice registry key hash protection, scripts cannot directly modify it. Users need to manually change through the system settings interface.
Reminder content:
- Press Win + I to open Settings
- Go to Apps → Default apps
- Enter file extension in search box (e.g., .jpg)
- Or click "Choose defaults by file type"
- Change the default application for the following extensions to desired program (e.g., Windows Photo Viewer):
- .jpg, .jpeg, .png, .gif, .bmp, .tiff, .ico
Optional: Restore Windows Photo Viewer If Windows Photo Viewer is not in the settings list, it may need to be restored through registry. But it's recommended to prioritize using the system settings interface.
Verify Overall Effect
After completion, run the following command to verify all operations have taken effect:
Write-Host "=== 1. Scheduled Tasks ==="
Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' } | Select-Object TaskName, State | Format-Table -AutoSize
Write-Host "=== 2. WPS.PIC Registry Entries ==="
$countHKCU = (Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count
$countHKLM = (Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count
Write-Host "HKCU: $countHKCU, HKLM: $countHKLM"
Write-Host "=== 3. photo.dll ==="
@("${env:ProgramFiles}\WPS", "${env:ProgramFiles(x86)}\WPS", "${env:LOCALAPPDATA}\WPS", "C:\WPS", "D:\WPS", "E:\WPS") | ForEach-Object {
if (Test-Path $_) {
$dlls = Get-ChildItem $_ -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue
if ($dlls) { $dlls | Select-Object FullName }
}
}
Write-Host "=== 4. photolaunch.exe ==="
@("${env:ProgramFiles}\WPS", "${env:ProgramFiles(x86)}\WPS", "${env:LOCALAPPDATA}\WPS", "C:\WPS", "D:\WPS", "E:\WPS") | ForEach-Object {
if (Test-Path $_) {
$exes = Get-ChildItem $_ -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue
if ($exes) { $exes | Select-Object FullName }
}
}
Expected verification results:
- All WPS scheduled tasks status is "Disabled"
- WPS.PIC registry entries count is 0
- No photo.dll files found
- No photolaunch.exe files found
Important Notes
-
May restore after WPS update: WPS may re-register these components after updates. If you find file associations hijacked again, you need to re-execute this skill's operations.
-
WPS other functions unaffected: This skill only disables WPS's image viewing module. WPS's word processing, spreadsheet, presentation and other core functions are not affected.
-
Administrator privileges required: Some operations (especially modifying HKLM registry entries) may require administrator privileges. If you encounter permission errors, please run PowerShell as administrator.
-
Backup recommendation: It's recommended to record current file association settings before executing operations, so you can restore when needed.
-
Multiple WPS versions: WPS may install multiple versions, need to process all versions of related files.
Working Principle
WPS uses the following mechanisms to hijack file associations:
- Scheduled tasks: Periodically run background processes to check and modify file associations
- Registry entries: Register WPS.PIC.* format file associations in HKLM and HKCU
- photo.dll plugin: Core component of the image module
- photolaunch.exe: Image viewer executable file
This skill completely blocks WPS's file association hijacking by disabling scheduled tasks, deleting registry entries, removing plugins and executable files.
相关技能
面向中文办公场景的 WPS 文档、表格与演示处理及格式兼容。
Stop letting IP allowlists interrupt your agent. After QR authorization and setup, OpenLX handles WeChat requests across changing client IPs. Create drafts, upload media, submit approved content and check results. Valid WeChat permissions required.
Batch image processing - compress, resize, format convert, watermark, EXIF clean, and crop. All local, no upload needed.
Convert manually typed formulas in Word documents (.doc, .docx, .wps) into editable Word equations while preserving layout through local Microsoft Word or Li...
Create, analyze, proofread, and modify Office documents (.docx, .xlsx, .pptx) using the officecli CLI tool. Use when the user wants to create, inspect, check...