I created bootstrapper,it works but it does not install NET Framework 4.0. After the installation completed my application does not start because no NET Framework 4.0. Why
I used dotnetinstaller for checking and installing pre-requisites. Its very simple and easy to use. Also it provides the facility to convert msi into exe and attaching UAC prompt. You need to have an configuration file
Then in your project in post-build event add this code. This will embed your msi and pre-requisite file.
copy /Y "$(ProjectDir)Files\dotnetfx35setup.exe" "C:\Windows\Temp"
copy /Y $(TargetPath) "C:\Windows\Temp"
"$(SolutionDir)Tools\dotNetInstaller 2.0\Bin\installerLinker.exe" /o:"$(TargetDir)Setup.exe" /t:"$(SolutionDir)Tools\dotNetInstaller 2.0\Bin\dotNetInstaller.exe" /c:"$(ProjectDir)Files\Configuration.xml" /b:"$(ProjectDir)Files\banner.bmp" /Embed+ /Verbose+