To install Ax4.0 and Ax5.0 follow the below steps.
1. .net framework 2.0 install.
2.windows installer3.1 install.
3.install .net framework 3.5.
4.install sql server 2005 sql server database services.
5.install the sp2 patch layer.(if u install ax2009 ,for ax4.0 it is not necessary).
6.change the active computer name and add environment variable one more
component UserDnsDomain value any thing.
7.install Ax 2009 application.
8.Create a new Data base instance with that active computer name.
9.it will successfully install all the components.
10.restore the changes done in step :6.
11.Go to the server configuration utility and change the database name to local computer name.
12.go to the client configuration utility and change the connecting instance computer name.
13.go to the services.msc and start the service.
14.upload the license and the data in the checklist.
For any details information please contact me,I will get back to you.