Skip to content

Commit

Permalink
Updeted.
Browse files Browse the repository at this point in the history
  • Loading branch information
KeilAwk committed Aug 15, 2024
1 parent 62534df commit c7c53ed
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions static/get_ravenmcn.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#RavenMCN安装脚本
#RavenMCN安装脚本

Out-String -InputObject "# RavenM国内版安装脚本
# 由RavenfieldCommunity维护"
Out-String -InputObject "# RavenM国内版安装脚本
# 由RavenfieldCommunity维护"

#创建session并使用直链api请求文件
#创建session并使用直链api请求文件
Try {
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0"
Expand Down Expand Up @@ -33,22 +33,22 @@ Try {
}
Catch
{
Out-String -InputObject "安装文件下载失败,请检查网络或反馈给社区管理"
Out-String -InputObject "安装文件下载失败,请检查网络或反馈给社区管理"
exit 1
}
Finally { Out-String -InputObject "安装文件下载成功" }
Finally { Out-String -InputObject "安装文件下载成功" }

#校验hash
#校验hash
$hash1 = Get-FileHash .\RavenMCN.zip -Algorithm SHA256
$hash2 = $hash1.Hash
Out-String -InputObject "安装文件Hash: $hash2"
Out-String -InputObject "安装文件Hash: $hash2"
if ($hash2 -eq "946539FC1FF3B99D148190AD04435FAF9CBDD7706DBE8159528B91D7ED556F78")
{
#解压
Out-String -InputObject "正在启动文件..."
#解压
Out-String -InputObject "正在启动文件..."
Expand-Archive .\RavenMCN.zip -Force
#运行
& .\RavenMCN\RavenM一键安装工具.exe
#运行
& .\RavenMCN\RavenM一键安装工具.exe
}
else { Out-String -InputObject "安装文件校验不通过,请反馈给社区管理" }
else { Out-String -InputObject "安装文件校验不通过,请反馈给社区管理" }

0 comments on commit c7c53ed

Please sign in to comment.