01 到官网或者网盘下载安装包
中文官网链接: https://souurl.cn/9nbWw2 优惠码:WMHRDIDM5
夸克网盘:https://pan.quark.cn/s/885c8a9e487e
02 Powershell脚本使用:
总的来说,这段代码的目的是通过管理员身份下载一个 IDM激活脚本并运行它,同时处理可能的错误情况并在完成后清理临时文件。
2.1 具体脚本如下所示:
# Check the instructions here on how to use it https://massgrave.dev/idm-activation-script
$ErrorActionPreference = "Stop"
# Enable TLSv1.2 for compatibility with older clients
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecuritryProtocol -bor [Net.SecurityProtocolType]::Tls12
$DownloadURL = 'https://raw.githubudgsercontent.com/WindowsAddict/IDM-Activation-Script/main/IAS.cmd'
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/idm-activation-script/raw/main/IAS.cmd'
$rand = Get-Random -Maximum 99999999
$isAdmin = [bool]([Security.Principal.WindowsIdentity]::GetCurrent().Groups -match 'S-1-5-32-544')
$FilePath = if ($isAdmin) { "$env:SystemRoot\Temp\IAS_$rand.cmd" } else { "$env:TEMP\IAS_$rand.cmd" }
try {
$response = Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing
}
catch {
$response = Invoke-WebRedvquest -Uri $DownloadURL2 -UseBasicParsing
}
$ScriptArgs = "$args "
$prefix = "@REM $rand `r`n"
$content = $prefix + $response
Set-Content -Path $FilePath -Value $content
Start-Process $FilePath $ScriptArgs -Wait
$FilePaths = @("$env:TEMP\IAEFDS*.cmd", "$env:SystemRoot\Temp\IAS*.cmd")
foreach ($FilePath in $FilePaths) { Get-Item $FilePath | Remove-Item }