{
    "version": "3.9.12.45",
    "description": "Free messaging and calling app by Tencent",
    "homepage": "https://pc.weixin.qq.com/",
    "license": {
        "identifier": "Proprietary",
        "url": "https://www.wechat.com/en/service_terms.html"
    },
    "architecture": {
        "64bit": {
            "url": "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup.exe#/dl.7z",
            "hash": "c29fc05630cfc95ef6483f6b5b52aabfe74265bb260e210e78ae437d305d8990"
        },
        "32bit": {
            "url": "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup_x86.exe#/dl.7z",
            "hash": "96e1623a1c84902cbf33138a962576c4e8ccc6babf92659c7a263f7039a8efa9"
        }
    },
    "installer": {
        "script": [
            "Remove-Item \"$dir\\`$*\", \"$dir\\Uninst*\" -Force -Recurse",
            "$configpath = \"$env:APPDATA\\Tencent\\WeChat\\All Users\\config\"",
            "ensure \"$configpath\" | Out-Null",
            "Set-Content -NoNewline -Path \"$configpath\\3ebffe94.ini\" -Value \"$persist_dir\"",
            "$regpath = \"HKCU:Software\\Tencent\\WeChat\"",
            "if (!(Test-Path \"$regpath\")) {",
            "    New-Item -Path \"$regpath\" -Type Directory -Force | Out-Null",
            "}",
            "New-ItemProperty -Path $regpath -Name \"FileSavePath\" -Value \"$persist_dir\" -Force | Out-Null"
        ]
    },
    "shortcuts": [
        [
            "wechat.exe",
            "WeChat"
        ]
    ],
    "persist": "WeChat Files",
    "uninstaller": {
        "script": [
            "Remove-Item -Path \"$env:APPDATA\\Tencent\\WeChat\\All Users\\config\\3ebffe94.ini\" -Force | Out-Null",
            "Remove-ItemProperty -Path \"HKCU:Software\\Tencent\\WeChat\" -Name \"FileSavePath\" -Force | Out-Null"
        ]
    },
    "checkver": {
        "script": [
            "$resp = Invoke-WebRequest -UseBasicParsing -Uri 'https://luban.m.qq.com/api/public/software-manager/softwareProxy' -Body 'cmdid=3318&jprxReq%5Breq%5D%5Bsoft_id_list%5D%5B%5D=11488' -Method 'POST'",
            "Write-Output $resp.Content"
        ],
        "jsonpath": "$..ver_name",
        "regex": "(3\\.[\\d.]+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup.exe#/dl.7z"
            },
            "32bit": {
                "url": "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup_x86.exe#/dl.7z"
            }
        }
    }
}
