-
Notifications
You must be signed in to change notification settings - Fork 12
/
手动滑块验证(高级).cmd
32 lines (32 loc) · 1.25 KB
/
手动滑块验证(高级).cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
cd %~dp0
if not exist main.ps1 (
echo 未找到一份有效的Mirai Dice 安装(是否已经解压?)
pause
goto :EOF
)
setlocal enabledelayedexpansion
set POWERSHELL_EXEC=powershell
!POWERSHELL_EXEC! -NoLogo -NoProfile -Command exit
if errorlevel 1 (
set POWERSHELL_EXEC=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
!POWERSHELL_EXEC! -NoLogo -NoProfile -Command exit
if errorlevel 1 (
echo 警告:找不到系统组件powershell,这可能代表系统已经损坏。正在使用pwsh
set POWERSHELL_EXEC=pwsh
!POWERSHELL_EXEC! -NoLogo -NoProfile -Command exit
if errorlevel 1 (
set POWERSHELL_EXEC=C:\Program Files\PowerShell\7\pwsh.exe
!POWERSHELL_EXEC! -NoLogo -NoProfile -Command exit
if errorlevel 1 (
echo 错误:找不到pwsh,请访问 https://aka.ms/powershell-release?tag=stable 手动安装PowerShell 7 后重试
echo 按任意键后将尝试打开下载页面(通常你需要下载并安装PowerShell-x.x.x-win-x64.msi)
pause
rundll32 url.dll,FileProtocolHandler https://aka.ms/powershell-release?tag=stable
exit
)
)
)
)
!POWERSHELL_EXEC! -NoLogo -NoProfile -ExecutionPolicy Bypass -File .\main.ps1 -s
pause