Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

102,450

Downloads of v 3.9.8.15:

7,577

Last Update:

15 Nov 2023

Package Maintainer(s):

Software Author(s):

  • Tencent Inc.

Tags:

admin messenger notsilent wechat

WeChat

  • 1
  • 2
  • 3

3.9.8.15 | Updated: 15 Nov 2023

Downloads:

102,450

Downloads of v 3.9.8.15:

7,577

Maintainer(s):

Software Author(s):

  • Tencent Inc.

WeChat 3.9.8.15

  • 1
  • 2
  • 3

This Package Contains an Exempted Check

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Exemption:

Works in the Chocolatey Test Environment, unknown why it is failing in the package verifier.

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install WeChat, run the following command from the command line or from PowerShell:

>

To upgrade WeChat, run the following command from the command line or from PowerShell:

>

To uninstall WeChat, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade wechat -y --source="'INTERNAL REPO URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade wechat -y --source="'INTERNAL REPO URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install wechat
  win_chocolatey:
    name: wechat
    version: '3.9.8.15'
    source: INTERNAL REPO URL
    state: present

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'wechat' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '3.9.8.15'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller wechat
{
    Name     = "wechat"
    Version  = "3.9.8.15"
    Source   = "INTERNAL REPO URL"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'wechat':
  ensure   => '3.9.8.15',
  provider => 'chocolatey',
  source   => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

Package Approved

This package was approved as a trusted package on 15 Nov 2023.

Description

From https://play.google.com/store/apps/details?id=com.tencent.mm

WeChat is more than a messaging and social media app - it is a lifestyle for over one billion users across the world. Chat and make calls with friends, read news and use local services in Official Accounts and Mini Programs, play fun games with friends, enjoy mobile payment features with WeChat Pay, and much more.

Why do over one billion people use WeChat? Well...
• MORE WAYS TO CHAT: Message friends using text, photo, voice, video, location sharing, and more. Create group chats with up to 500 members.
• VOICE AND VIDEO CALLS: High-quality voice and video calls to anywhere in the world. Make group video calls with up to 9 people.
• REAL-TIME LOCATION: Not good at explaining directions? Share your real-time location with the press of a button.
• MOMENTS: Share your favorite moments. Post photos, videos, and more to your Moments stream.
• TIME CAPSULE (NEW!): Share glimpses of your day. Record short videos to post in your Time Capsule before they disappear in 24 hours.
• STICKER GALLERY: Browse thousands of fun, animated stickers to help express yourself in chats, including stickers with your favorite cartoon and movie characters.
• CUSTOM STICKERS: Make chatting more unique with custom stickers and the new Selfie Stickers feature.
• OFFICIAL ACCOUNTS: Tons of accounts to follow with original content and news for your reading pleasure.
• MINI PROGRAMS: Countless third-party services all within the WeChat app that don’t require additional installation, saving you precious phone storage and time.
• TOP STORIES: See the latest articles your friends are reading and discover all kinds of interesting content.
• GAMES: Have fun and compete with friends in a huge selection of WeChat Mini Games and Tencent Games (*only available in certain regions).
• WECHAT PAY: Enjoy the convenience of world-leading mobile payment features with WeChat Pay and Wallet (*only available in certain regions).
• WECHAT OUT: Make calls to mobile phones and landlines around the globe at super low rates (*only available in certain regions).
• LANGUAGE SUPPORT: Localized in 20 different languages and can translate friends’ messages and Moments posts.
• BETTER PRIVACY: Giving you the highest level of control over your privacy, WeChat is the only messaging app to be certified by TRUSTe.
• AND MUCH MORE: Exercise with friends on WeRun, scan QR codes, and much more.


tools\.skipAutoUninstall
 
tools\chocolateyInstall.ps1
$PackageVersion = "3.9.8.15"

$Global:ErrorActionPreference = 'Stop'
$Global:InformationPreference = 'Continue'
$Global:VerbosePreference     = 'Continue'
$PackageInstaller             = "WeChatSetup_$PackageVersion"

# The WeChat installer and uninstaller do not detect that an instance of WeChat is running.
# Let us ensure a clean install.

Get-Process -Name WeChat, "$PackageInstaller" , 'Au_' -ErrorAction SilentlyContinue | Stop-Process

$autoHotkeyArgs = @{
    FilePath     = Get-ChocolateyPath -PathType InstallPath | Join-Path -ChildPath "lib\autohotkey.portable\tools\AutoHotkey.exe"
    ArgumentList = Get-ChocolateyPath -PathType PackagePath | Join-Path -ChildPath "tools\install.ahk"
    PassThru     = $true
}

$AutoHotKeyProcess = Start-Process @autoHotkeyArgs
Write-Verbose "Running $($AutoHotKeyProcess.ProcessName)"

$packageArgs = @{
    packageName                   = 'wechat'
    fileType                      = 'exe'
    url                           = "https://webcdn.m.qq.com/spcmgr/download/$PackageInstaller.exe"
    SilentArgs                    = ''
    softwareName                  = 'WeChat*'
    checksum                      = '761F9DE18676B4FE534BB09DD4D1B01CF4EEF31BB6E2B884F30A268FEF0E33634DD3A609BD85218BC33A3600EE97BC68FFD93478D029D7423312AF6CF8263299'
    checksumType                  = 'sha512'
    UseOnlyPackageSilentArguments = $true
}

Install-ChocolateyPackage @packageArgs
Wait-Process -InputObject $AutoHotKeyProcess -ErrorAction SilentlyContinue
Write-Verbose "Process $($AutoHotKeyProcess.ProcessName): HasExited $($AutoHotKeyProcess.HasExited) ExitCode $($AutoHotKeyProcess.ExitCode)"
tools\chocolateyUninstall.ps1
$PackageVersion = "3.9.8.15"

# 2023-06-18 Fabio A. Correa <[email protected]>
# Chocolatey Automatic Uninstaller cannot silently uninstall WeChat because the installation does
# not create a QuietUninstallString value in the Windows Registry. Additionally, Uninstall.exe
# does not sanitize its arguments, so /S gets passed to the cleanup program Au_.exe, which hangs.

# Because of this, we need to use AutoHotKey to uninstall WeChat.

# This directory contains a file .skipAutoUninstall to tell Chocolatey to skip the automatic uninstaller
# https://github.com/chocolatey/choco/issues/1257

Set-StrictMode -Version 3.0

$Global:ErrorActionPreference = 'Stop'
$Global:InformationPreference = 'Continue'
$Global:VerbosePreference     = 'Continue'
$PackageInstaller             = "WeChatSetup_$PackageVersion"

# The WeChat installer and uninstaller do not detect that an instance of WeChat is running.
# Let us ensure a clean uninstall.

Get-Process -Name WeChat, "$PackageInstaller" , 'Au_' -ErrorAction SilentlyContinue | Stop-Process

# Also, to ensure a clean uninstall, we need to do the manual uninstall.
# If we wanted to leave the task to Chocolatey automatic uninstall, we would need
# to leave AutoHotKey hanging. The testing platform does not like processes that hang.

$registryKeys = Get-UninstallRegistryKey -SoftwareName "WeChat"

$autoHotkeyArgs = @{
    FilePath     = Get-ChocolateyPath -PathType InstallPath | Join-Path -ChildPath "lib\autohotkey.portable\tools\AutoHotkey.exe"
    ArgumentList = Get-ChocolateyPath -PathType PackagePath | Join-Path -ChildPath "tools\uninstall.ahk"
    PassThru     = $true
}

$AutoHotKeyProcess = Start-Process @autoHotkeyArgs
Write-Verbose "Running $($AutoHotKeyProcess.ProcessName)"

foreach ($key in $registryKeys) {
    $packageArgs = @{
        PackageName                   = 'wechat'
        FileType                      = 'exe'
        File                          = $key.UninstallString
        SilentArgs                    = ''
        UseOnlyPackageSilentArguments = $true
    }
    Uninstall-ChocolateyPackage @packageArgs
}

Wait-Process -InputObject $AutoHotKeyProcess -ErrorAction SilentlyContinue
Write-Verbose "Process $($AutoHotKeyProcess.ProcessName): HasExited $($AutoHotKeyProcess.HasExited) ExitCode $($AutoHotKeyProcess.ExitCode)"
tools\common.ahk
package_version := "3.9.8.15"

; #ErrorStdOut             ; Best to keep this one disabled; it silences some errors.
; #Warn                    ; Enable warnings to assist with detecting common errors.
SendMode "Input"           ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir  ; Ensures a consistent starting directory.

close_all_instances(process_executable) {
    process_string := Format("ahk_exe {1}", process_executable)
    Loop 600 {
        If WinExist(process_string) {
            WinClose(process_string, , 600)
            Sleep(1000)
        } Else {
            Break
        }
    }
    Loop 600 {
        If ProcessExist(process_executable) {
            ProcessClose(process_executable)
            Sleep(1000)
        } Else {
            Break
        }
    }
    If ProcessExist(process_executable) {
        Throw("Please close all instances of " process_executable " before running choco")
    }
}

; https://www.autohotkey.com/docs/v2/lib/TrayTip.htm
hide_tray_tip() {
    TrayTip  ; Attempt to hide it the normal way.
    if SubStr(A_OSVersion,1,3) = "10." {
        A_IconHidden := true
        Sleep 200  ; It may be necessary to adjust this sleep.
        A_IconHidden := false
    }
}

patient_process_close(process_executable) {
    ProcessWaitClose(process_executable, 600)
    If ProcessExist(process_executable) {
        ; The testing platform does not like processes that hang
        ProcessClose(process_executable)
    }
}

patient_win_activate_as(process_executable, alternate_title) {
    process_string := Format("ahk_exe {1}", process_executable)
    Loop 1800 {
        ; Greedy Try-Catch for corner cases where the WeChat window is matched but does not activate
        Try {
            WinWait(process_string, , 600)
            WinWait(alternate_title, , 600) ; Making sure this window exists
            WinActivate(process_string)
            Break
        } Catch Any {
            Sleep(1000)
            Continue
        }
    }
}

patient_win_activate(process_executable) {
    process_string := Format("ahk_exe {1}", process_executable)
    Loop 1800 {
        ; Greedy Try-Catch for corner cases where the WeChat window is matched but does not activate
        Try {
            WinWait(process_string, , 600)
            WinActivate(process_string)
            Break
        } Catch Any {
            Sleep(1000)
            Continue
        }
    }
}

win_get_shape(&win_width, &win_height, process_executable) {
    process_string := Format("ahk_exe {1}", process_executable)
    WinGetClientPos(&win_x, &win_y, &win_width, &win_height, process_string) ; Only works when AutoHotKey is run as administrator
}

; Ensure that all instances of WeChat are closed. See chocolateyInstall.ps1
close_all_instances("WeChat.exe")
tools\install.ahk
#SingleInstance Force
#Include "common.ahk"

TrayTip("Chocolatey is using your mouse to go through the installer", "Installing WeChat")
; Ensure that any spurious instances of the WeChat uninstaller are closed. See chocolateyInstall.ps1
close_all_instances("Au_.exe")

installer_executable := Format("WeChatSetup_{1}.exe", package_version)
Sleep(1000)
patient_win_activate_as(installer_executable, "WeChat Install Wizard")
; Sending keystrokes, clicks, and events to the WeChat installer
; Send("{Tab}{Space}+{Tab}{Space}") ; Not currently working; nothing happens
; WinGetControls returns an empty list; the installer keeps its controls private
; We need to use win_width and win_height as the only reference we have available
win_get_shape(&win_width, &win_height, installer_executable)
Loop {
    Sleep 1000
} Until PixelSearch(&click_x, &click_y, win_width * 0.15, win_height * 0.7, win_width * 0.21, win_height * 0.8, 0xffffff)
Click(click_x, click_y) ; Click the "I have read and agreed to Terms and Privacy Policy" checkbox
Sleep(1000)
Loop {
    Sleep 1000
} Until PixelSearch(&click_x, &click_y, win_width * 0.45, win_height * 0.6, win_width * 0.55, win_height * 0.7, 0x07c160)
Click(click_x, click_y) ; Click the "Install" button
exe_path := "C:\Program Files\Tencent\WeChat\WeChat.exe"
Loop 1800 {
    Sleep(1000)
    If not FileExist(exe_path) {
        Continue
    }
    If FileGetVersion(exe_path) == package_version {
        Break
    }
}
hide_tray_tip
TrayTip("Giving the installer some extra time", "Installing WeChat")
Sleep(5000)
patient_win_activate_as(installer_executable, "WeChat Install Wizard")
; Send("{Tab}{Tab}{Tab}{Space}") ; Not currently working; we will use the mouse instead
MouseMove(win_width * 0.1, win_height * 0.1) ; If the Run button appears under the mouse pointer, this ends the hovering and returns the color to default
Loop {
    Sleep 1000
} Until PixelSearch(&click_x, &click_y, win_width * 0.45, win_height * 0.6, win_width * 0.55, win_height * 0.7, 0x07c160)
Click(click_x, click_y) ; Click the "Run" button: it will close the installer, start WeChat, avoid hangs.
patient_win_activate("WeChat.exe")
close_all_instances("WeChat.exe")
hide_tray_tip
tools\uninstall.ahk
#SingleInstance Force
#Include "common.ahk"

TrayTip("Chocolatey is using your mouse to go through the uninstaller", "Uninstalling WeChat")
; Ensure that any spurious instances of the WeChat installer are closed. See chocolateyInstall.ps1
close_all_instances(Format("WeChatSetup{1}.exe", package_version))

uninstaller_executable := "Au_.exe"
Sleep 1000
patient_win_activate(uninstaller_executable)
; Send "{Tab}{Space}" ; Not currently working; see install.ahk for more information
win_get_shape(&win_width, &win_height, uninstaller_executable)
Loop {
    Sleep 1000
} Until PixelSearch(&click_x, &click_y, win_width * 0.45, win_height * 0.7, win_width * 0.55, win_height * 0.8, 0x1aad19)
Click(click_x, click_y) ; Click the "Uninstall" button
exe_path := "C:\Program Files\Tencent\WeChat\WeChat.exe"
; The following Loop has a recommended timeout of 1800 seconds
Loop 1800 {
    Sleep 1000
    If FileExist(exe_path) {
        Continue
    } Else {
        Break
    }
}
hide_tray_tip
TrayTip("Giving the uninstaller some extra time", "Uninstalling WeChat")
Sleep 5000
patient_win_activate(uninstaller_executable)
; Send "+{Tab}+{Tab}+{Tab}{Space}" ; Not currently working; see install.ahk for more information
win_get_shape(&win_width, &win_height, uninstaller_executable) ; The window shape just changed
Loop {
    Sleep 1000
} Until PixelSearch(&click_x, &click_y, win_width * 0.7, win_height * 0.7, win_width * 0.8, win_height * 0.8, 0x1aad19)
Click(click_x, click_y) ; Click the "Done" button
patient_process_close("Au_.exe")

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
WeChat 3.9.7.29 1228 Sunday, October 29, 2023 Approved
WeChat 3.9.7.25 46 Sunday, October 29, 2023 Approved
WeChat 3.9.6.34 47 Wednesday, October 4, 2023 Approved
WeChat 3.9.5.91 37 Tuesday, July 11, 2023 Approved
WeChat 3.9.5.81 65 Friday, July 7, 2023 Approved
WeChat 3.9.2.23 8629 Friday, March 31, 2023 Approved
WeChat 3.9.0.28 1713 Wednesday, February 8, 2023 Approved
WeChat 3.8.1.26 949 Tuesday, December 20, 2022 Approved
WeChat 3.8.0.41 757 Wednesday, November 16, 2022 Approved
WeChat 3.8.0.33 416 Thursday, November 10, 2022 Approved
WeChat 3.7.6.44 1254 Saturday, September 3, 2022 Approved
WeChat 3.7.6.29 52 Thursday, September 1, 2022 Approved
WeChat 3.7.5.31 1582 Wednesday, August 10, 2022 Approved
WeChat 3.7.0.30 1338 Wednesday, June 8, 2022 Approved
WeChat 3.7.0.29 462 Saturday, June 4, 2022 Approved
WeChat 3.6.0.18 931 Tuesday, May 3, 2022 Approved
WeChat 3.5.0.46 3269 Monday, February 14, 2022 Approved
WeChat 3.4.0.38 17571 Tuesday, October 19, 2021 Approved
WeChat 3.3.5.50 1170 Wednesday, September 8, 2021 Approved
WeChat 3.3.0 1196 Wednesday, July 7, 2021 Approved
WeChat 3.1.0 19134 Sunday, January 31, 2021 Approved
WeChat 3.0.0 2396 Tuesday, October 20, 2020 Approved
WeChat 2.9.5.20201001 1532 Saturday, October 3, 2020 Approved
WeChat 2.9.5 18343 Tuesday, July 21, 2020 Approved
WeChat 2.7.1.1018 8157 Sunday, November 24, 2019 Approved
WeChat 2.6.8 1054 Monday, July 15, 2019 Approved

Tencent does not publish release notes for WeChat for Windows.

Silent installs are out of the scope of Tencent's work. Beginning with wechat v3.9.5.81, silent installs will be impossible with the official installer. This is because the /S parameter is incorrectly handled by one of the
installation binaries, hanging the installation. Additionally, AutoHotKey scripts can only use mouse click events because keyboard events are ignored by WeChat. Please contact the maintainers with any information that can help restore silent installs.

The WeChat Installer may differ from location to location. If you experience problems installing this package, please try installing a different version. WeChat will then upgrade itself through its built-in updater. For the complete version history, visit https://community.chocolatey.org/packages/wechat/#versionhistory

If you experience problems upgrading WeChat through Chocolatey, please pin the installed package to suppress upgrades:

choco pin add -n wechat

WeChat will continue to upgrade itself through its built-in updater regardless of the pin. For more information, visit https://docs.chocolatey.org/en-us/choco/commands/pin

The WeChat installer has a version number that is different from that of WeChat itself. The Chocolatey package tries to conform to the WeChat version.

Discussion for the WeChat Package

Ground Rules:

  • This discussion is only about WeChat and the WeChat package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or WeChat, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus