DirectX (June 2010)
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!"