forked from TGSAN/CMWTAT_Digital_Edition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCDNDirectRun.ps1
More file actions
15 lines (12 loc) · 800 Bytes
/
Copy pathCDNDirectRun.ps1
File metadata and controls
15 lines (12 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$isAdmin = (New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if (-not $isAdmin) {
Start-Process powershell -ArgumentList "irm https://fastly.jsdelivr.net/gh/TGSAN/CMWTAT_Digital_Edition/CDNDirectRun.ps1 | iex" -Verb RunAs
Exit
}
# $exePath = ".\CMWTAT_DIGITAL\bin\Debug\CMWTAT_DIGITAL.exe"
# $exeBytes = [System.IO.File]::ReadAllBytes($exePath)
# $bytes = $exeBytes
$bytes = (Invoke-WebRequest "https://release-download.static.cloudmoe.com/TGSAN/CMWTAT_Digital_Edition/releases/download/2.7.2.0/CMWTAT_Digital_Release_2_7_2_0.exe").Content
$assembly = [System.Reflection.Assembly]::Load($bytes)
$entryPointMethod = $assembly.EntryPoint
$entryPointMethod.Invoke($null, @())