{
    "version": "1.9.10",
    "description": "A context menu extender that lets you handpick the items to integrate into Windows File Explorer context menu.",
    "homepage": "https://nilesoft.org/",
    "license": "MIT",
    "url": "https://nilesoft.org/download/shell/1.9/setup.exe",
    "hash": "4df2b30fc6b9d6d7c95c7e5070fbeb305c7d1b30ef3c135bb9e2838c10114fb6",
    "innosetup": true,
    "architecture": {
        "64bit": {
            "pre_install": [
                "if(!(Test-Path \"$persist_dir\\shell.log\")) { New-Item \"$dir\\shell.log\" | Out-Null }",
                "Move-Item \"$dir\\shell,1.exe\" \"$dir\\shell.exe\"",
                "Move-Item \"$dir\\shell,1.dll\" \"$dir\\shell.dll\"",
                "Remove-Item \"$dir\\shell,2.*\"",
                "Remove-Item \"$dir\\shell,3.*\""
            ]
        },
        "32bit": {
            "pre_install": [
                "if(!(Test-Path \"$persist_dir\\shell.log\")) { New-Item \"$dir\\shell.log\" | Out-Null }",
                "Move-Item \"$dir\\shell,3.exe\" \"$dir\\shell.exe\"",
                "Move-Item \"$dir\\shell,3.dll\" \"$dir\\shell.dll\"",
                "Remove-Item \"$dir\\shell,1.*\"",
                "Remove-Item \"$dir\\shell,2.*\""
            ]
        }
    },
    "uninstaller": {
        "script": [
            "if ($cmd -eq 'uninstall') {",
            "    $regkey = Get-ItemProperty -Path 'HKLM:\\SOFTWARE\\Classes\\Directory\\background\\shellex\\ContextMenuHandlers\\nilesoft.shell' -ErrorAction SilentlyContinue",
            "    if ($regkey) {",
            "        if (!(is_admin)) { error 'Admin right is required to unregister nilesoft shell'; break }",
            "        Invoke-ExternalCommand \"$dir\\shell.exe\" -ArgumentList @('-unregister', '-restart', '-silent') -RunAs | Out-Null",
            "        if (Get-Process -Name 'shell' -ErrorAction SilentlyContinue) { Start-Sleep -Seconds 2 }",
            "    }",
            "}"
        ]
    },
    "bin": "shell.exe",
    "shortcuts": [
        [
            "shell.exe",
            "Nilesoft Shell"
        ]
    ],
    "persist": [
        "shell.log",
        "shell.nss"
    ],
    "checkver": {
        "url": "https://nilesoft.org/download/changes",
        "regex": "Version ([\\d.]+)"
    },
    "autoupdate": {
        "url": "https://nilesoft.org/download/shell/$majorVersion.$minorVersion/setup.exe"
    }
}
