From c67816dcd05ed6fb384b167d489d64c2ab0442f3 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 12:05:42 +0800 Subject: [PATCH 1/3] Move install directX section --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 11c945b..392a13a 100644 --- a/index.html +++ b/index.html @@ -45,16 +45,16 @@ function Main { } } + # --- Elevated section --- + New-Item -Path $flagPath -ItemType File -Force | Out-Null + Write-Host "Running with elevated privileges..." + $dxInstallOption = "Y" if ($isServer) { Write-Host "Windows Server detected. Would you like to install DirectX Runtime?" $dxInstallOption = Get-UserConfirmation -Message "" -TimeoutSeconds 10 -Default "N" } - # --- Elevated section --- - New-Item -Path $flagPath -ItemType File -Force | Out-Null - Write-Host "Running with elevated privileges..." - $tempDir = New-Item -ItemType Directory -Path ([IO.Path]::Combine($env:TEMP, [guid]::NewGuid().ToString())) $aria2Dir = Join-Path $tempDir "aria2" $aria2Exe = Join-Path $aria2Dir "aria2c.exe" From 32c0730ee1e16adf379b3bc3d717cd1a1b2ea063 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 12:10:51 +0800 Subject: [PATCH 2/3] Fix server check --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 392a13a..391d8aa 100644 --- a/index.html +++ b/index.html @@ -48,7 +48,7 @@ function Main { # --- Elevated section --- New-Item -Path $flagPath -ItemType File -Force | Out-Null Write-Host "Running with elevated privileges..." - + $dxInstallOption = "Y" if ($isServer) { Write-Host "Windows Server detected. Would you like to install DirectX Runtime?" @@ -159,7 +159,7 @@ function Main { if ($item.Name -Match "x64" -and $procArch -ne "AMD64" -and $buildVersion -lt 21390) { continue } - if ($item.Name -Match "directx" -and $isServer) { + if ($item.Name -Match "directx" -and $dxInstallOption -eq "N") { continue } $line = "$($item.Url)`n out=$($item.Name)" From c99a3c73844f56eda8c0d742f8a1c9b39279aab4 Mon Sep 17 00:00:00 2001 From: Calyx Hikari Date: Sun, 16 Nov 2025 12:16:17 +0800 Subject: [PATCH 3/3] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 391d8aa..aef125f 100644 --- a/index.html +++ b/index.html @@ -51,7 +51,7 @@ function Main { $dxInstallOption = "Y" if ($isServer) { - Write-Host "Windows Server detected. Would you like to install DirectX Runtime?" + Write-Host "Windows Server detected. Would you like to install DirectX Runtime (Y/N)?" $dxInstallOption = Get-UserConfirmation -Message "" -TimeoutSeconds 10 -Default "N" }