DirectX (June 2010)

From LANCommander
Revision as of 00:13, 30 November 2023 by DoctorDalek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Install Detection

This script simply looks for the existence of a registry entry indicating that DirectX has probably been installed previously.

$Exists = Test-Path "HKLM:\\SOFTWARE\Microsoft\DirectX"

if ($Exists -eq $True) {
    $Host.SetShouldExit(1)
} else {
    $Host.SetShouldExit(0)
}

Install Script

This script installs the DirectX (June 2010) redistributable silently.

Write-Host "Installing DirectX (June 2010) Redistributable..."
Start-Process -FilePath "DXSETUP.exe" -ArgumentList "/silent" -Wait -Passthru
Write-Host "Done!"