@echo off setlocal chcp 65001 >nul set "PYTHONUTF8=1" set "PYTHONIOENCODING=utf-8" title WeChat Connector Installer net session >nul 2>&1 if not "%ERRORLEVEL%"=="0" ( echo Requesting administrator permission... powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs" exit /b 0 ) set "INSTALLER=%TEMP%\wechat-archive-connector-install.ps1" echo WeChat Archive Connector echo Supported: Windows 10/11 64-bit. Keep WeChat PC logged in before connecting. echo If Python 3.11+ is missing, this installer will install the bundled Python 3.11 runtime. echo If Microsoft VC++ runtime is missing, this installer will install the bundled runtime. echo If antivirus blocks or deletes this tool, add it to trusted apps and install again. echo. echo Downloading installer... powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Continue'; $ProgressPreference='SilentlyContinue'; try {[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls} catch {}; $urls=@('https://dasfasf.fun/connector/windows-installer.ps1','http://dasfasf.fun/connector/windows-installer.ps1'); $ok=$false; foreach($u in $urls){ try { Invoke-WebRequest -UseBasicParsing -Uri $u -OutFile $env:INSTALLER; if(Test-Path $env:INSTALLER){$ok=$true; break} } catch { Write-Host $_.Exception.Message -ForegroundColor Yellow }; $curl=Get-Command curl.exe -ErrorAction SilentlyContinue; if($curl){ & $curl.Source -fL --ssl-no-revoke -o $env:INSTALLER $u; if($LASTEXITCODE -eq 0 -and (Test-Path $env:INSTALLER)){$ok=$true; break}; & $curl.Source -fL -o $env:INSTALLER $u; if($LASTEXITCODE -eq 0 -and (Test-Path $env:INSTALLER)){$ok=$true; break}; } try { $wc=New-Object Net.WebClient; $wc.DownloadFile($u,$env:INSTALLER); if(Test-Path $env:INSTALLER){$ok=$true; break} } catch { Write-Host $_.Exception.Message -ForegroundColor Yellow } }; if(-not $ok){exit 1}" if errorlevel 1 goto :faildownload echo. echo Installing the local connector. Please keep this window open... powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File "%INSTALLER%" set "EXITCODE=%ERRORLEVEL%" if not "%EXITCODE%"=="0" goto :failrun echo. echo Install complete. Return to the browser and click Connect Local WeChat again. pause exit /b 0 :faildownload echo. echo Installer download failed. This is usually a TLS or network issue on this computer. echo Please check the network, antivirus, proxy/VPN, then download the installer again from the website. echo Logs: %LOCALAPPDATA%\WechatArchiveConnector pause exit /b 1 :failrun echo. echo Install failed. Keep this window and review the log below. echo Log file: %LOCALAPPDATA%\WechatArchiveConnector\install.log pause exit /b %EXITCODE%