From NSIS Wiki
Error: 'DXSETUP.exe - This application could not be started' when installing AutoCAD LT 2018. Products and versions covered. AutoCAD LT 2018. After it's finished, go to that folder and run DXSETUP.exe as administrator. Reboot your computer once the installation is finished. This will resolve the missing DirectX library issue for C&C Generals, C&C 3 Tiberium Wars, C&C Red Alert 3, C&C 4 Tiberian Twilight and their expansions, as well as the Battle for Middle-earth series. Download locations for DirectX Redistributable 9.29.1974 June 2010, Downloads: 96354, Size: 95.63 MB. DirectX 9.0 redistributable package.
The following is for NSIS installations where the source is a media such as a DVD, CD-ROM, or otherwise can store the 100mb+ DirectX installation. As the installer will be on fixed media, we can save installation time and user's hard drive space by running directly from the source media, rather than coping install files. Software desigo insight crack.
For web-based installers, please use the DirectX Installation with Web Installer instructions.
- 1Prerequisites
- 2Installing DirectX
- 2.2Using DirectSetup
Prerequisites
Obtaining the DirectX Runtime Install
Obtain the Latest DirectX End-User Runtimes from Microsoft. You can use any release, but it's best to get the latest runtime, even if your title doesn't explicitly require it.
When you get the file, you will need to extract the contents, rather than installing the runtimes. To do this, you will need to run the file in a command line as follows, defining the export location in the /T parameter:
Placing the DirectX install
You will need include the full DirectX installation files on your final media and outside of the NSIS installer itself. This allows the DirectX setup to run and install without copying DirectX Setup files to the user system.
While the contents can be named and places anywhere in relative to the final installer executable, this document will assume the following layout:
- ~/setup.exe (Your final NSIS installer file.)
- ~/DirectX/
- dxsetup.exe
- dsetup.dll
- dsetup32.dll
- All the other DirectX setup files.
If you lay out files in this structure, you can define the location of the DirectX installer files as:
Installing DirectX
There are two ways to go about the install. The easy way or use DirectSetup to interface with the DirectX install program directly.
The Easy Way
If you simply want to run the installer with only a fail/success status, this is the way to go. This script will do the following:
- Launch the DirectX Installer on the source media.
- NSIS waits till the DirectX installer finishes.
- Close and continue with the install script.
First, you will need to define a variable at the very beginning of your script:
To make things easier on yourself, create a new Section for DirectX. NSIS will run the section while installing. The placement of the section could go anywhere, but it's highly recommended that DirectX be the last install section after everything else is complete. This is incase DirectX fails, your software will be installed.
If you use component install UI, DirectX will show up as an entry. You can force on with 'SectionIn RO', or leave out if you wish the user to have the option to run the DirectX install.
Note: Change the ExecWait line to point to the path of DXSETUP.exe. In this example, $EXEDIR is used to point to the directory the NSIS installer is located, then a subfolder of 'DirectX'.
The variable $DirectXSetupError is used to force NSIS to pause while the DirectX setup is running. You can use the error code to further script error handling, but a variable is required to be there in order for NSIS to wait.
I've also included DetailPrint lines to display the DirectX status in the install logs. These strings can be localized to your liking.
Using DirectSetup
DirectSetup is the direct interface to the DirectX setup application. For this you will still need to have all of the DirectX setup files on a fixed location in relation to the NSIS installer you create. This script will also require the use of the System plug-in, which is included in NSIS.
First, you'll need the following NSH. The best way is to save the code as 'DirectSetup.nsh'.
Then you will need to put in the following include line in your main NSIS script:
From here, you will need to invoke the macro during the install process.
DirectX_Version
While not required to use, you can use this code to return the user's currently installed DirectX version. Keep in mind that since DirectX9, Microsoft hasn't changed the reporting of DirectX versions.
The following will output the main version number to $2 and the revision number to $3 as an integer converted from a Hex value. You will need to replace ${DirectX_SRC} with the location of the extracted DirectX Setup files.
DirectX_Install
This function will run the DirectX install. The command will wait here until the install process is complete, returning errors and writing DetailPrint statements. You will need to replace ${DirectX_SRC} with the location of the extracted DirectX Setup files.
When completed, you will get the return value of the Setup in $9. Refer to the NSI file to what the return codes are and what they mean.
Note: There is a return code for DirectSetup which requires the computer to reboot. The macro will set the SetRebootFlag to true in this case.
Dxsetup.exe Run
To Do
Dxsetup.exe Command
There's a way to have the DirectSetup run callbacks which update the current status of the DirectX install. However, I can't seem to get my head around running callbacks with the System Plug-in. Any assistance in this is greatly appreciated!
Directx 9
See Also
Dxsetup.exe Download
Retrieved from 'https://nsis.sourceforge.io/mediawiki/index.php?title=DirectX_Installation_for_Fixed_Media&oldid=17520'