DirectX (June 2010)

From LANCommander
Revision as of 00:03, 31 October 2023 by DoctorDalek (talk | contribs) (Created page with "Category:Redistributables {{Redistributable.Scripts.DetectInstall |Name = Install Detection |Description = This script simply looks for the existence of a registry entry indicating that DirectX has probably been installed previously. |RequiresAdmin = False |Contents = <syntaxhighlight lang="powershell" line> $Exists = Test-Path "HKLM:\\SOFTWARE\Microsoft\DirectX" if ($Exists -eq $True) { exit 1; } else { exit 0; } </syntaxhighlight> }} {{Redistributable.Scri...")
(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) {
    exit 1;
} else {
    exit 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!"