This is an old revision of the document!
Adaptation of the opsi-template scripts for DirectX 9.0c
DirectX End-User Runtimes 9.29.1974, June 2010
Downloadable from: http://www.microsoft.com/en-us/download/details.aspx?id=8109
This is one file for both x86 and x64 installations.
You have to unpack the downloaded file to the files directory, I use Total Commander for unpackaging. There is also a command-line option which I forgot.
[Package] version: 1 depends: incremental: False [Product] type: localboot id: directx-9 name: DirectX 9.0c description: DirectX 9.0c June 2010 redistributable advice: version: 9.29.1974 priority: 0 licenseRequired: False productClasses: setupScript: setup.ins uninstallScript: updateScript: alwaysScript: onceScript: customScript: userLoginScript: [ProductProperty] type: unicode name: install_architecture multivalue: False editable: True description: Defines x86 or x64 architecture values: ["32 only", "64 only", "both", "system specific"] default: ["both"] [Changelog] directx-9 (9.29.1974-1) testing; urgency=low * Initial package -- ICT <ict@your-mom.com> Thu, 21 Jun 2012 03:03:14 +0000
[Actions] requiredWinstVersion >= "4.10.8.6" DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $ExitCode$ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; no white space use '-' as a seperator Set $ProductId$ = "directx" Set $MinimumSpace$ = "500 MB" ; ---------------------------------------------------------------- if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ isFatalError ; Stop process and set installation status to failed else comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ comment "Start setup program" Winbatch_install Sub_check_exitcode endif [Winbatch_install] "%ScriptPath%\files\dxsetup.exe" /silent [Sub_check_exitcode] comment "Test for installation success via exit code" set $ExitCode$ = getLastExitCode ; informations to exit codes see ; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx ; http://msdn.microsoft.com/en-us/library/aa368542.aspx if ($ExitCode$ = "0") comment "Looks good: setup program gives exitcode zero" else comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ if ($ExitCode$ = "1605") comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed." comment "Uninstall of a not installed product failed - no problem" else if ($ExitCode$ = "1641") comment "looks good: setup program gives exitcode 1641" comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success." else if ($ExitCode$ = "3010") comment "looks good: setup program gives exitcode 3010" comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success." else logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$ isFatalError endif endif endif endif