On a general note, the 'Installation Failed' message can be displayed when autorun is invoked by a logged on user who is not a member of the local Administrator's group (on Vista, you may need to right-click autorun.inf and select 'Run as administrator').
Also, here are several links that have general information on autorun (and the 'NoDriveTypeAutoRun' registry entry
Create an Autorun CD-ROM for Applications That You Create by Using Microsoft Visual Studio .NET :-
Steps are
1) Start Visual Studio .NET.
2) Create a simple Console Application or Windows Application.
3) Build the application.
4) On the File menu, point to New, and then click Project.
5) In Project Types, click Setup and Deployment Projects. In Templates, click Setup projects
6) Name the project Setup, and then click OK.
7) In Solution Explorer, right-click your Setup project, click Add, and then click File.
8) In the File name text box, type the absolute path of the executable that you built in step3, and then click Open.
9) On the Build menu, click Build Solution.
10) Start any text editor (such as Notepad).
Paste the following code in the text editor, and then save the file as Autorun.inf:
[autorun]
open=Setup.exe
Note :- To prepare an Autorun CD-ROM for the Visual Studio .NET application that you built in step 3, copy the files that were generated in step 9 and the Autorun.inf file that you created in step 11 to the CD-ROM.