You have to add a console project to your solution
and in the main method you will write the below code remember to replace "Your service file.exe" with the name of your service exe file
Process.Start(Environment.GetEnvironmentVariable("windir") + @"\Microsoft.NET\Framework\v4.0.30319\installutil", $"\"{Environment.CurrentDirectory}\\Your service file.exe\"");
after adding above project
When you right click on your added setup project, you will see view menu, in view menu there will be custom action link click it, in window that is appeared right click install and click add custom action, then double click Application Folder then click Add Output button on the right and then select the console project from drop-down menu then select primary out put then click ok and we are done.
KEEP IN MIND YOU NEED TO RUN THE INSTALATION SETUP AS ADMINISTRATOR