If you need to delete the installer immediately after the installation, you have to implement some custom solution. As you have already found yourself, executable cannot delete itself as the executable is locked when it is running.
You can implement a small tool that you install by your installer. The tool will be run by the installer, when an installation finishes. The tool will keep running silently and trying to delete the installer, until is succeeds.
[Files]
; Install the tool
Source: "zapself.exe"; DestDir: "{app}"
[Run]
; Run the tool and pass the installer path
Filename: "{app}\zapself.exe"; Parameters: "{srcexe}"
Actually you do not need to build an .exe
for this. A simple batch file created on-the-fly will do, for an example, see Unload a .NET DLL from an unmanaged process.
Need to say that I really do not understand why you are trying to do this.