← Back to Skills Marketplace
ibiubiu233i

禁止WPS反复篡改图片文件默认打开方式

by Ibiubiu233I · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ pending
0
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install stop-wps-image-assoc-reset
Description
Permanently prevent WPS Office from hijacking image file associations, restore user control over default image viewers
README (SKILL.md)

\r \r

Prevent WPS Image File Association Hijacking\r

\r

Overview\r

\r 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.\r \r

Execution Steps\r

\r

Step 1: Disable WPS Scheduled Tasks\r

\r 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.\r \r Auto-detect and disable all WPS scheduled tasks:\r

# Find all WPS-related scheduled tasks\r
$wpsTasks = Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' }\r
Write-Host "Found $($wpsTasks.Count) WPS scheduled tasks:"\r
$wpsTasks | Select-Object TaskName, State | Format-Table -AutoSize\r
\r
# Disable all WPS scheduled tasks\r
$wpsTasks | ForEach-Object {\r
    try {\r
        Disable-ScheduledTask -TaskName $_.TaskName -ErrorAction Stop\r
        Write-Host "✅ Disabled: $($_.TaskName)"\r
    } catch {\r
        Write-Host "⚠️ Failed to disable: $($_.TaskName) - $($_.Exception.Message)"\r
    }\r
}\r
```\r
\r
**Verification command:**\r
```powershell\r
Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' } | Select-Object TaskName, State\r
```\r
\r
**Expected result:** All WPS scheduled tasks show status "Disabled"\r
\r
### Step 2: Delete WPS Image Registry Entries\r
\r
WPS registers numerous image format associations (WPS.PIC.*) in the registry that need to be completely removed.\r
\r
**Auto-detect and delete HKCU WPS.PIC entries:**\r
```powershell\r
$regItems = Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }\r
Write-Host "Found $($regItems.Count) WPS.PIC registry entries"\r
\r
$regItems | ForEach-Object {\r
    try {\r
        Remove-Item -Path $_.PSPath -Recurse -Force -ErrorAction Stop\r
        Write-Host "✅ Deleted: $($_.PSChildName)"\r
    } catch {\r
        Write-Host "⚠️ Failed to delete: $($_.PSChildName) - $($_.Exception.Message)"\r
    }\r
}\r
```\r
\r
**Auto-detect and delete HKLM WPS.PIC entries (if present):**\r
```powershell\r
$regItemsHKLM = Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }\r
if ($regItemsHKLM) {\r
    Write-Host "Found $($regItemsHKLM.Count) WPS.PIC registry entries in HKLM"\r
    $regItemsHKLM | ForEach-Object {\r
        try {\r
            Remove-Item -Path $_.PSPath -Recurse -Force -ErrorAction Stop\r
            Write-Host "✅ Deleted: $($_.PSChildName)"\r
        } catch {\r
            Write-Host "⚠️ Failed to delete: $($_.PSChildName) - $($_.Exception.Message)"\r
        }\r
    }\r
} else {\r
    Write-Host "No WPS.PIC registry entries found in HKLM"\r
}\r
```\r
\r
**Verification command:**\r
```powershell\r
$countHKCU = (Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count\r
$countHKLM = (Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count\r
Write-Host "HKCU remaining: $countHKCU, HKLM remaining: $countHKLM"\r
```\r
\r
**Expected result:** All WPS.PIC.* registry entries are deleted, counts are 0\r
\r
### Step 3: Delete photo.dll Plugin\r
\r
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.\r
\r
**Auto-search and delete all photo.dll files:**\r
```powershell\r
# Search common installation paths\r
$paths = @(\r
    "${env:ProgramFiles}\WPS",\r
    "${env:ProgramFiles(x86)}\WPS",\r
    "${env:LOCALAPPDATA}\WPS",\r
    "C:\WPS",\r
    "D:\WPS",\r
    "E:\WPS"\r
)\r
\r
$found = $false\r
foreach ($basePath in $paths) {\r
    if (Test-Path $basePath) {\r
        $dlls = Get-ChildItem $basePath -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue\r
        foreach ($dll in $dlls) {\r
            try {\r
                Remove-Item -Path $dll.FullName -Force -ErrorAction Stop\r
                Write-Host "✅ Deleted: $($dll.FullName)"\r
                $found = $true\r
            } catch {\r
                Write-Host "⚠️ Failed to delete: $($dll.FullName) - $($_.Exception.Message)"\r
            }\r
        }\r
    }\r
}\r
\r
if (-not $found) {\r
    Write-Host "No photo.dll files found"\r
}\r
```\r
\r
**Verification command:**\r
```powershell\r
$paths | ForEach-Object {\r
    if (Test-Path $_) {\r
        Get-ChildItem $_ -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue | Select-Object FullName\r
    }\r
}\r
```\r
\r
**Expected result:** No photo.dll files found\r
\r
### Step 4: Rename photolaunch.exe Files\r
\r
WPS image viewer executable file, may exist in multiple versions, needs to be automatically searched and renamed.\r
\r
**Auto-search and rename all photolaunch.exe files:**\r
```powershell\r
$paths = @(\r
    "${env:ProgramFiles}\WPS",\r
    "${env:ProgramFiles(x86)}\WPS",\r
    "${env:LOCALAPPDATA}\WPS",\r
    "C:\WPS",\r
    "D:\WPS",\r
    "E:\WPS"\r
)\r
\r
$found = $false\r
foreach ($basePath in $paths) {\r
    if (Test-Path $basePath) {\r
        $exes = Get-ChildItem $basePath -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue\r
        foreach ($exe in $exes) {\r
            try {\r
                $newName = $exe.FullName + ".bak"\r
                Rename-Item -Path $exe.FullName -NewName $newName -Force -ErrorAction Stop\r
                Write-Host "✅ Renamed: $($exe.FullName)"\r
                $found = $true\r
            } catch {\r
                Write-Host "⚠️ Failed to rename: $($exe.FullName) - $($_.Exception.Message)"\r
            }\r
        }\r
    }\r
}\r
\r
if (-not $found) {\r
    Write-Host "No photolaunch.exe files found"\r
}\r
```\r
\r
**Verification command:**\r
```powershell\r
$paths | ForEach-Object {\r
    if (Test-Path $_) {\r
        Get-ChildItem $_ -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue | Select-Object FullName\r
    }\r
}\r
```\r
\r
**Expected result:** No photolaunch.exe files found, only photolaunch.exe.bak\r
\r
### Step 5: Remind User to Manually Set Default Applications\r
\r
Due to Windows UserChoice registry key hash protection, scripts cannot directly modify it. Users need to manually change through the system settings interface.\r
\r
**Reminder content:**\r
1. Press **Win + I** to open Settings\r
2. Go to **Apps → Default apps**\r
3. Enter file extension in search box (e.g., .jpg)\r
4. Or click "Choose defaults by file type"\r
5. Change the default application for the following extensions to desired program (e.g., Windows Photo Viewer):\r
   - .jpg, .jpeg, .png, .gif, .bmp, .tiff, .ico\r
\r
**Optional: Restore Windows Photo Viewer**\r
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.\r
\r
## Verify Overall Effect\r
\r
After completion, run the following command to verify all operations have taken effect:\r
\r
```powershell\r
Write-Host "=== 1. Scheduled Tasks ===" \r
Get-ScheduledTask | Where-Object { $_.TaskName -match 'WPS|wps' } | Select-Object TaskName, State | Format-Table -AutoSize\r
\r
Write-Host "=== 2. WPS.PIC Registry Entries ===" \r
$countHKCU = (Get-ChildItem 'HKCU:\SOFTWARE\Classes' | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count\r
$countHKLM = (Get-ChildItem 'HKLM:\SOFTWARE\Classes' -ErrorAction SilentlyContinue | Where-Object { $_.PSChildName -like 'WPS.PIC*' }).Count\r
Write-Host "HKCU: $countHKCU, HKLM: $countHKLM"\r
\r
Write-Host "=== 3. photo.dll ===" \r
@("${env:ProgramFiles}\WPS", "${env:ProgramFiles(x86)}\WPS", "${env:LOCALAPPDATA}\WPS", "C:\WPS", "D:\WPS", "E:\WPS") | ForEach-Object {\r
    if (Test-Path $_) {\r
        $dlls = Get-ChildItem $_ -Recurse -Filter "photo.dll" -ErrorAction SilentlyContinue\r
        if ($dlls) { $dlls | Select-Object FullName }\r
    }\r
}\r
\r
Write-Host "=== 4. photolaunch.exe ===" \r
@("${env:ProgramFiles}\WPS", "${env:ProgramFiles(x86)}\WPS", "${env:LOCALAPPDATA}\WPS", "C:\WPS", "D:\WPS", "E:\WPS") | ForEach-Object {\r
    if (Test-Path $_) {\r
        $exes = Get-ChildItem $_ -Recurse -Filter "photolaunch.exe" -ErrorAction SilentlyContinue\r
        if ($exes) { $exes | Select-Object FullName }\r
    }\r
}\r
```\r
\r
**Expected verification results:**\r
1. All WPS scheduled tasks status is "Disabled"\r
2. WPS.PIC registry entries count is 0\r
3. No photo.dll files found\r
4. No photolaunch.exe files found\r
\r
## Important Notes\r
\r
1. **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.\r
\r
2. **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.\r
\r
3. **Administrator privileges required**: Some operations (especially modifying HKLM registry entries) may require administrator privileges. If you encounter permission errors, please run PowerShell as administrator.\r
\r
4. **Backup recommendation**: It's recommended to record current file association settings before executing operations, so you can restore when needed.\r
\r
5. **Multiple WPS versions**: WPS may install multiple versions, need to process all versions of related files.\r
\r
## Working Principle\r
\r
WPS uses the following mechanisms to hijack file associations:\r
1. **Scheduled tasks**: Periodically run background processes to check and modify file associations\r
2. **Registry entries**: Register WPS.PIC.* format file associations in HKLM and HKCU\r
3. **photo.dll plugin**: Core component of the image module\r
4. **photolaunch.exe**: Image viewer executable file\r
\r
This skill completely blocks WPS's file association hijacking by disabling scheduled tasks, deleting registry entries, removing plugins and executable files.\r
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install stop-wps-image-assoc-reset
  3. After installation, invoke the skill by name or use /stop-wps-image-assoc-reset
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release. - Provides step-by-step PowerShell procedures to permanently block WPS Office from hijacking image file associations. - Detects and disables all WPS-related scheduled tasks. - Completely removes WPS.PIC.* registry entries from both HKCU and HKLM. - Automatically searches for and deletes WPS image viewing module files (photo.dll, photolaunch.exe), including renaming executables. - Instructs the user on how to manually restore desired image viewers as default apps.
Metadata
Slug stop-wps-image-assoc-reset
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 禁止WPS反复篡改图片文件默认打开方式?

Permanently prevent WPS Office from hijacking image file associations, restore user control over default image viewers. It is an AI Agent Skill for Claude Code / OpenClaw, with 0 downloads so far.

How do I install 禁止WPS反复篡改图片文件默认打开方式?

Run "/install stop-wps-image-assoc-reset" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 禁止WPS反复篡改图片文件默认打开方式 free?

Yes, 禁止WPS反复篡改图片文件默认打开方式 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does 禁止WPS反复篡改图片文件默认打开方式 support?

禁止WPS反复篡改图片文件默认打开方式 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 禁止WPS反复篡改图片文件默认打开方式?

It is built and maintained by Ibiubiu233I (@ibiubiu233i); the current version is v1.0.0.

💬 Comments