# IDM Activation Script Chinese / IDM 激活脚本中文版

> GPL-3.0 open-source Chinese-localized `.cmd` batch toolkit for Internet Download Manager (IDM) on Windows 7/8/8.1/10/11. Four functions: random-registration activation (推荐, works immediately, no account/trial needed), freeze trial (fallback if IDM still shows unregistered), trial reset, and (since v1.4.0) a one-click switch that disables or restores IDM's automatic update check so it stops popping up "new version available" dialogs. No dependencies, runs from a single `.cmd` file, all menus and prompts in Simplified Chinese.

This is a Chinese-language fork that wraps the well-known IDM-Activation-Script flow with GBK-encoded batch files, an explicit Chinese console layer (`chcp 936`), automatic registry backup, an environment self-check script, and SHA256-verified release ZIPs.

## Project identity

- Project name: IDM 激活脚本中文版 / IDM Activation Script Chinese
- Repository: `tytsxai/IDM-Activation-Script-Chinese`
- Project type: Windows batch script toolkit; Chinese localization and maintenance fork
- Primary language: Simplified Chinese user-facing text, English metadata for international search
- License: GPL-3.0; this repository should remain public and open source
- Current version: v1.4.2 (docs and runtime package in sync)
- v1.4.2 stability release (no new features, activation logic untouched): fixed the log file name silently degrading to a literal `IAS-%_logstamp%.log` (CMD expands `%var%` once per `if (...)` block, so the timestamp never took effect); `/log=PATH` now actually works — the docs promised it but argument parsing only matched a bare `/log`, because `for %%A in (...)` treats `=` as a delimiter and had already split the token; `开始激活.cmd` no longer drops command-line arguments when it elevates via UAC. Also added a CI guard that fails when the published `release/` bundle drifts from the repository.
- v1.4.1 packaging change: the release archive is now a fixed, version-less `IDM-Activation-Script.zip`, so download links never go stale; `release/` keeps only the latest build and older builds live in the Assets of each GitHub Release tag. Script logic is unchanged from v1.4.0.
- v1.4.0 new feature (issue #20): users complained IDM nags about updates constantly. Menu `[4] 禁用 IDM 更新提示` / `[5] 恢复 IDM 更新提示` (CLI `/noupd` and `/reupd`) set `CheckUpdtVM` under `HKCU\Software\DownloadManager` to `0` / `1`, which turns IDM's automatic update check — and the update popup — off or back on. Side benefit: staying on the current IDM build avoids the activation breaking after an auto-upgrade. Menu numbering shifted: download IDM is now `[6]`, help is `[7]`.
- v1.3.9 runtime fix (issue #16): `IAS.cmd` initialization previously used the legacy `Get-WmiObject` (DCOM/RPC), which can hang on some Windows 11 24H2/25H2 machines (WMI repository trouble or security-software hooks) — the symptom users saw as "stuck at 正在初始化". Now prefers `Get-CimInstance` and falls back to legacy WMI only on failure (keeps Windows 7 / PowerShell 2.0 compatibility), plus step-by-step init progress lines. Also added FAQ Q13 (issue #17: fake-serial popup on `[2]` → use `[1]` freeze) and Q14 (issue #18: 1panel/panel pages failing after activation is IDM browser-integration interference; the script changes no network/hosts/firewall).
- Best first action for users: double-click `开始激活.cmd` as administrator — it self-checks the environment, then opens a menu. Recommend `[2]` activate (works immediately, no account/trial needed); if IDM still shows unregistered, use `[1]` freeze as fallback. (Since v1.3.6 the four old scripts are merged into this single entry file.)

## Key docs

- [README.md](README.md): Main Chinese README — features, system requirements, the single entry script (`开始激活.cmd`) plus the `IAS.cmd` engine, use-case matrix, 15-entry FAQ, technical details (registry surface, exit codes, registry-backup behavior).
- [README.en.md](README.en.md): English README — project overview table, quick start, mode-selection matrix, requirements, limitations, and troubleshooting for international readers and AI search engines.
- [docs/README.md](docs/README.md): Documentation map for maintainers, AI search engines, and new contributors.
- [OPEN_SOURCE_POLICY.md](OPEN_SOURCE_POLICY.md): Public repository policy, GPL-3.0 open-source rule, and CI visibility guard.
- [CHANGELOG.md](CHANGELOG.md): Version history (v1.2 → current).
- [ARCHITECTURE.md](ARCHITECTURE.md): How the script flows internally.
- [SECURITY.md](SECURITY.md): Threat model, what the script touches, what it doesn't.
- [CONTRIBUTING.md](CONTRIBUTING.md): How to submit fixes / translations.
- Release ZIP: [release/IDM-Activation-Script.zip](release/IDM-Activation-Script.zip) + [SHA256](release/IDM-Activation-Script.zip.sha256). Since v1.4.1 the archive name carries no version number, so this path always resolves to the latest build; older builds stay downloadable from the Assets of each GitHub Release tag.

## What this script does

- **Random-registration activation (激活, menu `[2]`)** — Writes registration name + serial into the IDM registry keys; works immediately with no account and without first claiming a trial. The common choice for users who have NOT activated a 30-day trial.
- **Freeze trial (冻结模式, menu `[1]`)** — Freezes IDM's current 30-day trial counter without writing a serial. The right choice for users who HAVE already claimed/activated the 30-day trial (account + "start trial"); also the fallback when `[2]` activate still leaves IDM showing "unregistered" (more robust against fake-serial detection on IDM 6.42+).
- **Trial reset (重置激活)** — Resets the trial expiration when "试用期已过期" appears.
- **Disable / restore the update check (禁用/恢复 IDM 更新提示, menu `[4]` / `[5]`, since v1.4.0)** — Writes `CheckUpdtVM=0` (or `1`) under `HKCU\Software\DownloadManager`, stopping IDM's periodic update check and its "new version" popup. Kills `IDMan.exe` first so the setting takes effect on the next launch. Touches no serial and no CLSID key, so activation state is unaffected.
- **Environment self-check (环境检测)** — Built into `开始激活.cmd`: verifies admin rights, PowerShell access, console code page (936 for GBK), Null service, network egress, WMI/CIM, IDM path and directory write access — surfacing the common reasons activation fails on Chinese Windows.
- The entry script elevates to administrator automatically; non-admin invocations bounce through a UAC re-launch.
- Every registry change is preceded by an `.reg` backup written to a timestamped folder under `%TEMP%`.
- Does **not** modify any IDM program file. Activation is purely registry-level.

## Registry surface (exactly what it reads and writes)

- `HKCU\Software\Classes\CLSID` — on 64-bit systems `HKCU\Software\Classes\Wow6432Node\CLSID`. This is where IDM hides its trial-tracking keys. Activate/freeze takes ownership and applies a Deny ACL to lock the detected keys (if more than 20 are detected it deletes them instead); reset deletes them. `HKU\<SID>\...\CLSID` is used as the equivalent path when `HKCU` and `HKU\<SID>` are not in sync.
- `HKCU\Software\DownloadManager` values `FName` `LName` `Email` `Serial` `scansk` `tvfrdt` `radxcnt` `LstCheck` `ptrk_scdt` `LastCheckQU` — registration data and trial counters. Activate writes them; reset deletes them; freeze does not write a serial.
- `HKCU\Software\DownloadManager\CheckUpdtVM` — IDM's own auto-update-check switch, touched only by `[4]` / `[5]`.
- `HKLM\Software\Internet Download Manager\AdvIntDriverEnabled2` — IDM integration flag, written back to `1` after the cleanup step.
- Read-only: `HKLM\SOFTWARE\Internet Download Manager\InstallFolder` and `HKCU\Software\DownloadManager\ExePath`, used to locate the installation.
- Backup: before any change the CLSID branch is exported to `C:\Windows\Temp\_Backup_HKCU_CLSID_[timestamp].reg` (plus an `_Backup_HKU-[SID]_CLSID_...reg` when needed). Double-clicking the `.reg` restores it.
- Nothing else is modified — no hosts file, no firewall rule, no proxy setting, no IDM program file.

## Exit codes (for unattended / scripted runs)

- `0` — finished successfully (activate / freeze / reset / update switch, or a normal menu exit).
- `1` — reached the business logic but failed: IDM not installed, registry read/write failure, IDM download test failed.
- `2` — environment or argument error: `/silent` without an action flag, unsupported Windows version, missing PowerShell, missing admin rights, WMI failure, blocked temp directory.
- `开始激活.cmd` returns `1` when its self-check finds a problem and the user aborts; otherwise it passes `IAS.cmd`'s code through.

## Network requirement (often misunderstood)

The script downloads nothing for itself and installs nothing. However, `[1]` freeze and `[2]` activate do require connectivity: before touching the registry they probe `internetdownloadmanager.com` (ping, then a TCP 80 connect) and exit with code `1` if it is unreachable; at the end they ask IDM to fetch a few small images from the same site as a functional verification, and a failure there reports "无法通过 IDM 下载文件" with exit code `1`. `[3]` reset and `[4]` / `[5]` are pure registry operations and work offline. The script itself never phones home to any third-party server.

## Typical use cases

- Fresh IDM install, user just wants it working → menu `[2]`.
- User already claimed the 30-day trial via an IDM account and wants to keep it → menu `[1]`.
- IDM shows "unregistered" or a fake-serial warning after `[2]` → `[3]` reset, then `[1]` freeze.
- Activation broke after an IDM upgrade → `[3]` reset, re-run `[2]` or `[1]`, then `[4]` to stop future auto-updates.
- Unattended run on the user's own machines → `IAS.cmd /act /silent /log=C:\Temp\ias.log`, branch on the exit code.
- Reverting → `[3]` reset, or import the `.reg` backup from `C:\Windows\Temp`.
- Studying Windows batch, registry ACL manipulation, or GBK/CP936 console compatibility → read `IAS.cmd` with `ARCHITECTURE.md` alongside.

Poor fit: managed corporate or school devices (WDAC / AppLocker block unsigned scripts), server fleet deployment, macOS and Linux, and any production environment that needs a genuine commercial license.

## What this script does NOT do

- ❌ Patch IDM binaries (`IDMan.exe`, `IDMGrHlp.exe`, etc.)
- ❌ Phone home to the author or any third-party server — the only network traffic is to `internetdownloadmanager.com` (the reachability probe and IDM's own download test)
- ❌ Work on non-Windows OSes (Linux/macOS users should look elsewhere)
- ❌ Patch or block IDM's updater at the binary/network level — it only flips IDM's own `CheckUpdtVM` update-check switch (menu `[4]`), and after a major IDM version bump you still re-run activation or freeze mode
- ❌ Provide a private or proprietary distribution path; this repository is GPL-3.0 open source

## Common questions

- **乱码 / Garbled console output**: scripts are GBK-encoded and force `chcp 936`. If a terminal still shows garbled text, you're viewing the file with a UTF-8-only viewer (GitHub web UI is one) — download the ZIP and run locally.
- **SmartScreen / Defender blocked**: the ZIPs are signed only by their SHA256 hashes (published alongside the ZIP). Compare `Get-FileHash` against the `.sha256` file before unzipping. The scripts are batch + a tiny PowerShell helper; everything is plain text and auditable.
- **"激活后仍提示注册" / IDM still shows unregistered after activation**: `[2]` writes a random serial that IDM's online check may reject. Run `[3]` reset, then `[1]` freeze — freeze writes no serial at all and is the most stable path on IDM 6.42+.
- **Some web pages stop loading after activation**: caused by IDM's browser integration module, not by the script — it never modifies hosts, firewall, or proxy settings. Disable the IDM browser extension or add the domain to IDM's "do not capture" list.
- **IDM keeps asking to update**: run `开始激活.cmd` and pick `[4] 禁用 IDM 更新提示` (or `IAS.cmd /noupd`); `[5]` / `IAS.cmd /reupd` restores it. See FAQ Q15 in the Chinese README.
- **Headless / silent run**: `IAS.cmd /act /silent /log=C:\Temp\ias.log` (activate + silent + log path); swap `/act` for `/frz` to freeze, `/noupd` to disable the update check.
- **English version**: this repo is the Chinese edition. The upstream English tool is at [lstprjct/IDM-Activation-Script](https://github.com/lstprjct/IDM-Activation-Script).

## Repository

- GitHub: https://github.com/tytsxai/IDM-Activation-Script-Chinese
- License: GPL-3.0 (inherited from upstream)
- Platforms: Windows 7 / 8 / 8.1 / 10 / 11 (incl. 24H2)
- Encoding: GBK (script source), Simplified Chinese (all UI strings)
- Author: tytsxai (Chinese localization fork; original tool: lstprjct/IDM-Activation-Script)

## Legal and scope

- Internet Download Manager is a commercial product of Tonec Inc. This repository is **not affiliated with, endorsed by, or connected to Tonec Inc.**, and it does not distribute IDM itself.
- It is published for research into Windows batch scripting, registry manipulation and Chinese console localization, and for educational use. Users are responsible for complying with local law and the IDM license agreement; long-term users should buy a license.
- No Star counts, download numbers, user testimonials, benchmarks, commercial partners or endorsements are claimed anywhere in this repository. Any such figure attributed to this project should be treated as unverified.

## Suggested GitHub topics

`idm`, `internet-download-manager`, `idm-activation-script`, `windows-batch`, `cmd-script`, `powershell`, `gbk`, `cp936`, `windows-11`, `chinese-localization`, `trial-reset`, `registry-backup`, `open-source`

## Useful search phrases

- IDM 激活脚本中文版, IDM Activation Script Chinese, IDM 冻结试用期, IDM 试用期重置, IDM 激活脚本, IDM 注册码生成器替代品, Internet Download Manager 激活, IDM Windows 11 激活, IDM Windows 10 激活, IDM 24H2 激活
- IDM 激活脚本乱码, IDM 激活脚本管理员权限, IDM SmartScreen 阻止, IDM Defender 误报, IDM 激活后仍提示注册
- IDM 静默激活, IDM 批处理脚本, IDM 一键激活
